Site icon Hot Pepper Communications

Standards in form fields

As I mentioned in a previous post, I wish there was some standard or convention or consensus on what values to attach to the name attribute of common input elements.

I thought it would be a good idea to open up a thread to devote to this very thing, so feel free to add your comments below.

First, just so everyone is clear, here is an example of the code to which I refer:

<input type="text" name="foo" />

The attribute I am referencing is name="foo". We will be discussing the value for that attribute (in this case, what replaces “foo”).

Here are some suggestions.

Field purpose Name value
A person’s full name Name
First name FirstName
Last name LastName
Street address Address
City City
Province Province
State State
Postal code PostalCode
Zip code ZipCode
Country Country
Phone number Phone
Fax number Fax
Search term q

What do you think? Do you have any other suggestions? What are some other common fields?

If you know persons who might be interested in this idea, please let them know about his thread so they can contribute to the discussion.

Exit mobile version