Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

Form validation problem


Go to End


2 Posts   1714 Views

Avatar
blaater

Community Member, 22 Posts

5 February 2008 at 9:48pm

Hi,

I want to validate a large form. Quiet easy with requiredfields etc, but the problem is it can only be validate on a certain action. I have got one save button and a save & sent button. The validation must only takes place when you click on the save & sent button. Is this possible? It now validates on every submit of both buttons. I just want a validation on the save & sent button.

Thx in advance.

Avatar
Ingo

Forum Moderator, 801 Posts

7 February 2008 at 9:22am

currently the validator isn't as versatile as we'd like it to be, so you have to override Validator::includeJavascriptValidation() and change to a conditional onsubmit handler