Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Form validation problem

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

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

Page: 1
Go to End
Author Topic: 1431 Views
  • blaater
    Avatar
    Community Member
    22 Posts

    Form validation problem Link to this post

    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.

  • Ingo
    Avatar
    Forum Moderator
    801 Posts

    Re: Form validation problem Link to this post

    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

    1431 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.