Posted 2007-05-12T22:55:00+01:00 in web usability
I'm working on some HTML web forms for a new website at work. I had to choose names for the fields. I figured that if I choose the same name for the field as other sites do, than the user's web browser will probably be able to AutoComplete data as the user types the first letters in the form field, like:
City: N... City: Ne.. City: New. City: New York
Ingredient: C... Ingredient: Cu... Ingredient: Cucumber
So, that set me of on a quick tour on the web in search of form fields for a name, emailaddress, city, and postal code. Low and behold, I haven't come across any consistent naming for these fields. Am I the only person seeing the value of AutoComplete across sites? Well, hardly: There are many sites using the letter q for free text searches in the site, in analogy with Google. But for the other fields, like city and postal code, I haven't found any reference material indicating a preference for a word, like 'city' for the locality (VCard definition) where someone might live.
Ian Hickson and comrades have defined the autocomplete attribute
on input elements. It's defined as:
The on value means the UA may store the value entered by the user so that if the user returns to the page, the UA can prefill the form. The off value means that the UA must not remember that field's value.
As specified in the Web Forms 2.0 proposal from 2005.
That indicates that some thought has been given to the autocomplete feature on webpages, but no mention of coherent naming across sites to ease the process of filling out forms.
Some slightly related specifications might help me out, like the VCard standard. The VCard spec defines a set of names that are very similar to the ones I regularly use in websites, here's a selection:
Let's lay claim to some input names:
An e-mail address identifies a location to which e-mail can be delivered.
A given name specifies and differentiates between members of a group of individuals, especially a family, all of whose members usually share the same family name.
The term locality has different meanings in different disciplines: In geography, a locality is a place. This is the primary meaning of the term, from which other uses derive.
A postal code is a series of letters and/or digits appended to a postal address for the purpose of sorting mail.
The first line of the street address, route number, or other specific identifier for the physical location of the site or incident.
A family name, or surname, is that part of a person's name that indicates to what family he or she belongs.
A simple form would look like this:
<form>
<fieldset>
First name <input type="text" name="given-name" />
Last name <input type="text" name="surname" />
Email address <input type="text" name="email-address" />
<button type="submit">OK</button>
</fieldset>
</form>
So, I've got a starting point. Trivial, but really useful. Let me know if you find this a useful idea too.