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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

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   1646 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