I have a form field of type email for logging in. We also allow users to log in with their nicknames and phone numbers.
The problem is that Twitter bootstrap automatically blocks the form submit if the format in the email field is not email (doesn't contain say '@').
Is there any way to disable this twitter .js binding on clicking my "Sign in" button?
Been googling around for some 2 hours now and couldn't find any solutions so I would greatly appreciate any answers!
<input type="text" />
This text type is not bad. But in the mobile web page, this <input>
tag will display keyboard for just normal text not email.
What did it mean? Mobile phone's keyboard did not show @
, so users should swipe keyboard to type @
. And they can not use autocomplete. This is bad ux.
Use novalidate="novalidate" attribute in your <form>
tag. This attribute skip validation when submitted. Here's examples.
<form novalidate="novalidate" class="simple_form new_user">
...
</form>
If you use rails ERB simple-form, then you can use novalidate like this.
<%= simple_form_for(resource, html: { novalidate: true }) do |f| %>
...
<% end %>
Simply use html without email attribute:
<input type"email" /><!--will block-->
<input type="text" /><!--will not block-->
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With