Now blogging at dkeithrobinson.com | Good Stuff: Web Hosting by Dreamhost

Better Web Forms

December 28, 2004 | Comments 4 Comments

Summary: Some brief tips on creating better Web forms.

This article was originally published on July 28, 2003, for the now defunct DKRProductions. In an effort to refresh and consolidate some old content, I’m re-publishing it.

Making a good Web based form is tricky, and not often done well. There are things that can be done to make Web forms more easy to use, as well as being more useful on the back end. Most of these things involve making the form as simple as possible.

Have a Plan

The first step to a better Web form is to understand thoroughly what the form’s purpose is. A good plan and solid goals are a must when designing a form. The form should be discussed in detail by all concerned parties. The developer should sit down and gather details with those who are going to be handling the form as well as potential users of the form if possible.

Some good information to identify:

  • What is the basic function of the form.
  • Who will be using the form.
  • What information is absolutely necessary to gain from the form and what information is optional.
  • What are the back end or business processes behind the form.
  • Potential areas for confusion.

Be realistic in these discussions, ask tough questions. There are cases where putting a form up on the Web might be making a process more complicated, thus making the form a waste of time and a scenario for failure. Once you have a good plan and a good idea of what this form will be, it will be time to flesh the form out.

Make some cuts

A short form is a good form. The shorter and more simple you can keep it, the more likely a user is to fill it out properly. If possible cut fields from the form, and whatever you do, don’t duplicate fields. The key here is to make sure the form is only collecting information that will be used. If you don’t need an address, don’t ask for one and never ask for something twice.

Try to break the form up into manageable pieces. This can be done a number of ways. You can break a large form with multiple functions into several forms, or a large single-purpose form into multiple pages. At the least, if you have a one page form, group fields into related sections.

Be Clear

Do whatever you can to help the person filling out your form. Mark required fields clearly and if possible validate those fields for the correct format, etc. When in doubt, explain what you are looking for. If you have a section where you want to collect information about a person’s job — say that explicitly so that you get a job related phone number for example.

For potentially confusing parts of the form, have help. It’s ok to have some explanation, as long as it’s brief and will help the user complete the form, as well as cut down on errors and improperly filled out forms.

Speaking of errors, make sure an explain in detail what has gone wrong when a form doesn’t validate or for any reason encounters an error. Contingency design is very important in forms, and too often done poorly. Many times a user is left hanging if proper error messages aren’t displayed. If you are looking for a phone number in a specific format, for example, and your validate kicks an error that doesn’t explain what that format is, you are going to have one confused user.

One more thing on errors. Never, and I mean never, clear valid fields when making a user go back and fix an improperly filled out field. In addition, it’s good to make sure these “bad” fields are easy to locate and fix. Remember to explain them if there could be confusion.

Lastly, a clearly worded confirmation message is a must. This lets the user know the form has been accepted and they are done. This should be made a high priority in any form process and is often overlooked.

The Details

Below is a list of some general things that can be done to make a form more usable. These should be taken with a grain of salt, they will be helpful in general, but not a submitted for good planning and goals for a form. As always, make sure to test, test, test for best results.

  • Have the form focus on the first field. This gives the user a place to start.
  • In general, don’t have more than on field on one horizontal line unless they are related, like City, State and Zip.
  • Don’t provide the user with a “clear” or “reset” button. These can be accidentally clicked and are often confused with the “submit” button.
  • Have a consistent format for required fields. If you use an asterisk on one form field, us that on every required field on all forms on your site.
  • For text boxes, vary the length of the box to suit the information being gathered. This will give the user a visual cue as to what you are looking for. A short “State” box for example.

Filed under: Gorilla Web Tips

Comments

1. Matthew Farrand said:

Another general thing to add would be not to validate forms you design so that valid data is rejected.

I recently got told by one site that my email address was incorrect. It didn’t tell me why it was supposedly invalid and the details I had entered were correct. A quick look at the source of the page told me that the site rejected email addresses where the dot character occured less than three characters into the address. In order to proceed I had to disable JavaScript. If you are going to write a validation script for email at least check the form of valid email addresses.

The purpose of client side validation is to help people fill the form in correctly. In my experience it’s better to be too lenient than too strict.

Posted on December 28, 2004 02:28 PM | #

2. William Murray said:

Great article, but I have to disagree with one suggestion. I don’t think it’s wise to automatically throw focus to the first field of a form. I’ve used this behavior in the past, but I plan to drop it in the future. Although it may be advantageous in some situations, I’m wary about using it on websites that do not have small, controlled audiences.

Placing the cursor in a form field prevents visitors from using the arrow keys and scroll wheel if they want to peruse the form before filling it out. Visitors can click out of the field to re-enable those keys and wheels, but then they have to click back into the form, making the initial cursor position irrelevant.

I’d like to explore alternatives that help the user without taking away functionality. One option would be to use the tabindex attribute in form fields. And if a site allows users to set individual preferences, such as opening external links in a new window, it should be trivial to add an option to enable the focus behavior.

Posted on January 18, 2005 12:07 PM | #

3. Jim Keli said:

On a somewhat unrelated note, I thought I should share this great tool that I found a couple of weeks ago. It’s a Web Counter which lets you track visits, page hits, visitor information, etc. etc. etc. It appears as a simple counter, but believe me, it’s much more than that. I highly recommend giving it a try - it’s totally free and you can install it in practically two seconds. Well, maybe FIVE seconds, if you’re a newbie. :)

Posted on January 20, 2005 04:53 AM | #

4. Lane A said:

It seems like common sense that the shorter your form is, the more likely it is that readers will fill it out and submit.

But I’m looking for actual research and data thta supports this. Can anyone help?

Posted on February 2, 2005 01:09 PM | #

Comments are now closed

Entry Archives

You are reading Better Web Forms posted on December 28, 2004 and filed under Gorilla Web Tips.

About the Author

is a Web designer and developer in Seattle, Washington. More »


7nights.com  Web


Old Stuff: