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   563 Views

Avatar
BobRock

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?

Bob

Avatar
Willr

Forum Moderator, 5513 Posts

6 September 2013 at 8:57pm

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