Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails: How "email_field" differs from "text_field"?

I understand that text_field creates an input field of type text, while email_field creates an input field of type email.

But, what is the difference between these two input types ?

Say I have a client model while a client has an email. Should I use email_field here ?

like image 857
Misha Moroshko Avatar asked Feb 06 '11 12:02

Misha Moroshko


1 Answers

The email field is the new html 5 input which right now behaves the same on most of the machines with the exception of a few mobile devices such as the iphone where it switches to a different keyboard.

You can find more about it by googling html5 email field.

It's just a touch of finesse which some users will appreciate.

like image 140
vise Avatar answered Oct 21 '22 08:10

vise