Take the 2-minute tour ×

Is there a naming convention for form fields? For what fields do Chrome, IE, Firefox look for? I mean, one for all, or at least most of the modern browsers.

I stumbled upon:

e.g. the ECML approach uses such names:

Description               Field name
ship to title             Ecom_ShipTo_Postal_Name_Prefix
ship to first name        Ecom_ShipTo_Postal_Name_First
ship to middle name       Ecom_ShipTo_Postal_Name_Middle
ship to last name         Ecom_ShipTo_Postal_Name_Last

user ID                   Ecom_User_ID
user password             Ecom_User_Password

But those "Ecom_..." form fields appear odd to me?

I know about the IE-only and proprietary (of course) attribute VCARD_NAME="vCard.xyz", but it's an invalid html attribute.

Or is the best shot, to write the fields in the most common way like @F. B. suggests at Form field names used by personal data auto-fill in browsers (Safari, Opera)

share|improve this question

1 Answer 1

up vote 1 down vote accepted

You seem to have linked to the answers. If you are not using high-level frameworks like CakePHP or Ruby on Rails, though, the first and third links do not apply.

The thing is, it's Google Toolbar and Wand's job to fill out forms successfully. Given the scope of the internet, the toolbar must have tons of redundancy.

Therefore, as long as you keep your form fields semanticly named, the form should autofill.

ECML is E-Commerce Modeling Language. Ecom_ simply stands for E-Commerce. If you need to sell stuff, use that naming convention.

share|improve this answer
I agree, for example I tend to use username for a username and email for an email field. firstname, fname and first_name all pre-fill as the browsers understand all of these. Make sure you use some spam control like a hidden field with a dynamic value that can be recreated by the server and checked to stop robots –  Ryan Jul 6 '11 at 17:12
Hmmm. But since field naming from the coding perspective is basically arbitrary - they could be called anything and still work - it seems an ideal area to have a "best practice" or microformat. Sure you can use any vaguely semantic name for an "email" field for auto completion to work, but the standard one is xxxx. That would really help. –  Robin Winslow Jan 15 '13 at 21:23
Good point. Perhaps there is a convention I am not yet aware of. It does seem as though there isn't, though, as I have not come across a single reference to such spec. It might make sense to ask a W3C working group or something. –  citelao Jan 17 '13 at 0:01

Your Answer


