Ruby on Rails Wednesday, January 27, 2016

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.

Here is all the relevant (I think) code.

Enter code here...form_for(:customer, url: {:action => 'update', :id => @customer.id, :account_settings => true},:html => {:novalidate => 'novalidate'}) do |f|
          = render(:partial => 'form', :locals => {:f => f})

And this is what the form shows in HTML
<input class="form-control" id="customer_contact_email" name="customer[contact_email]" pattern="false" type="email">

Thank you.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/05fa43d5-9244-405c-96de-d7e5eb569fc0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment