Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Standard names for HTML input fields

I've tried searching for the answer to this question all kinds of ways but with no success.

Is there a list of "standard" names for fields in an HTML form? For example, "First Name", "Home Phone", etc. I suspect there's probably not an official standard but more of a loose convention. I am creating a form and if possible I'd like it to play nicely with form fillers, accessibility software, etc.

What information do form fillers typically use to determine where to put a user's phone number or email address in a form?

like image 504
Josh Avatar asked Mar 11 '10 15:03

Josh


2 Answers

See http://www.ietf.org/rfc/rfc3106.txt

Also some info about Google toolbar auto fill here http://www.google.com/support/forum/p/Toolbar/thread?tid=7ce6293ebaa69edb&hl=en

The above Google link is dead. Use these instead:

https://developers.google.com/web/updates/2015/06/checkout-faster-with-autofill

https://developers.google.com/web/fundamentals/design-and-ui/input/forms/

like image 151
Martin Smith Avatar answered Oct 13 '22 00:10

Martin Smith


What information do form fillers typically use to determine where to put a user's phone number or email address in a form?

There is no widely applied standard I know of, and most sites pretty much do as they like. I think every automatic form filler has to have the ability to detect those fields intelligently, so I would say you can basically name them as you please.

You could, however, look at what other popular formats like vCard name their elements after. That's probably as close to a standard as you will get.

like image 23
Pekka Avatar answered Oct 12 '22 23:10

Pekka