Hi I am trying to disable chrome’s html5 validations. I have added
:html => {:novalidate => ‘novalidate’}
to the form tag but when I check the form in the browser it is not there
and the validations keep me from submitting the form.
Sorry I put the wrong line of HTML, the form works:
Here it is in Chrome
Is this looking at the raw HTML, or the rendered DOM? Chrome might be
being pedantic here, and refusing to show GET attributes in a POST form.
I recall somewhere in the mists of time that while that may work, it may
also not be standard and thus a conforming UA would be within its
rights to drop it, since POST trumps GET in all cases. See if the form
works uniformly when you add a hidden field to it with :account_settings
as the name, and remove the querystring from the form action. If you add
that with a f.hidden_field helper, then you will need to change your
controller to access the attribute from within the parent object’s
params hash, i.e.: params[:customer][:account_settings] rather than
params[:account_settings].
Sorry I put the wrong line of HTML, the form works:
Here it is in Chrome
Is this looking at the raw HTML, or the rendered DOM? Chrome might be being
pedantic here, and refusing to show GET attributes in a POST form. I recall
somewhere in the mists of time that while that may work, it may also not be standard and thus a conforming UA would be within its rights to drop it, since
POST trumps GET in all cases. See if the form works uniformly when you add a
hidden field to it with :account_settings as the name, and remove the querystring
from the form action. If you add that with a f.hidden_field helper, then you will
need to change your controller to access the attribute from within the parent
object’s params hash, i.e.: params[:customer][:account_settings] rather than
params[:account_settings].
Further to this a good plan is to copy/paste the complete generated
html into the html validator
Often when different browsers behave differently for the a site is it
down to invalid html, which the two browsers are interpreting
differently.
Colin
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.