Type attribute for text_field
- by Koning Baard XIV
I have this code:
<%= f.text_field :email, :type => "email", :placeholder => "john@example.com" %>
So people can enter their email on an iPhone with the email keyboard instead of the ASCII keyboard. However, the output is:
<input id="user_email" name="user[email]" placeholder="john@example.com" size="30" type="text" />
which…