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.

Form Questions

Set The novalidate Attribute On <form>?


Reply

2 Posts   478 Views

Avatar
BobRock

5 September 2013 at 11:45pm Community Member, 15 Posts

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

Avatar
Willr

6 September 2013 at 8:57pm Forum Moderator, 5511 Posts

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