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

Form Questions /

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

Set The novalidate Attribute On <form>?

Go to End

2 Posts   2115 Views


Community Member, 15 Posts

5 September 2013 at 11:45pm

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?



Forum Moderator, 5523 Posts

6 September 2013 at 8:57pm

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