Jump to:

2011 Posts in 1436 Topics by 620 members

Form Questions

SilverStripe Forums » Form Questions » Set The novalidate Attribute On <form>?

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

Page: 1
Go to End
Author Topic: 449 Views
  • BobRock
    Avatar
    Community Member
    15 Posts

    Set The novalidate Attribute On <form>? Link to this post

    As I understand the Form class the only method available to set form attributes is setAttribute( String $name, String $value ).

    But to set the novalidate attribute, there is only one parameter, novalidate.

    How do I add the novalidate attribute to a form object?

    Bob

  • Willr
    Avatar
    Forum Moderator
    5497 Posts

    Re: Set The novalidate Attribute On <form>? Link to this post

    $field->setAttribute('formnovalidate', 'true'); should work.

    449 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.