Home > Articles

Using HTML Input Controls to Accurately Capture Users' Data

  • Print
  • + Share This
Take a close look at the input controls in your Web applications and see how to pick the right tool (check box, radio button, etc.) for the job, along with examining some common interaction problems.
This chapter is from the book

"In saying what is obvious, never choose cunning. Yelling works better."

Cynthia Ozick, "We Are the Crazy Lady and Other Feisty Feminist Fables" in The First Ms. Reader

In contrast to the Viewing and Navigation layer, the interactions in the Editing and Manipulation layer result in persistent changes to the user's data. Owing to HTML's limited interactive vocabulary and the complex nature of these interactions, the Editing and Manipulation layer contains some of the most challenging and difficult aspects of the overall design. In addition, the technical limitations of Web applications are particularly visible in this layer. In many cases, the ideal level of sophistication and interactivity is too difficult or costly to achieve, resulting in a variety of implementation tradeoffs and compromises. Therefore, the appropriate and practical design solution requires a delicate balance between users' needs and technical feasibility.

This chapter approaches the problem from three different angles: the overall goals and purpose of forms, the proper use of HTML input controls, and how to combine input controls to facilitate complex interactions.

Designing Forms: Thinking in Terms of the Whole

Remember the chapter about structural models and the discussion about views and forms? When designing the structural model, the focus is on the flow of the site as a whole and how various types of pages contribute to that flow. After determining that a particular workflow requires a form, however, the challenge of the details still remains.

At the highest level, forms are essentially a mechanism for the application to ask the user questions: "When would you like to fly?," "What is your address?," and so forth. By contrast, views are essentially a mechanism for the user to do the asking: "What is the balance of my account?," "What do you have in the housewares department?," and so on.

As we all know, the rules of polite conversation are slightly different, depending on who's doing the talking and who's doing the listening. Therefore, the guidelines and conventions for form design are also slightly different from those for views.

Pace Appropriately

It's hard to hold a conversation with someone who talks too fast or asks 16 questions before giving you a chance to answer. The same is true whether you're interacting with another person or with a Web application. Therefore, determining the optimal length and density of information are two immediate concerns affecting the design of the overall form.

"We need to collect 67 fields of data. Should we create six really short forms, four medium-length forms, or one honkin' long form?"

The answer is, of course, one of balance. If the user needs to see all the options at the same time, the form will necessarily be long. Similarly, if choices in one part of the form determine the available choices in another part, the form will need to be divided into multiple pages. It's a bit like feeding babies; you want to be sure each bite is big enough to keep them interested, and you also want them to know what's coming for dessert. The balance, however, is to not stuff so much in their mouths at once that they spit it back up all over you.

When you're considering this question, a good place to start is a careful review of the functional requirements. Do you really need all those fields, or could some be eliminated? Are any fields optional? Can those fields be moved to another page or grouped together so as not to distract from the form's main elements? At a minimum, are required fields clearly differentiated from optional fields so that users can quickly identify what information they do and don't have to supply?

Complex forms can have so many input elements that the sheer volume of controls is overwhelming. Although it's acceptable to make users scroll, that doesn't give you a license to create a form of any length. Long forms are as painful and intimidating as a mortgage application and should generally be avoided. Imagine how many potential sellers get scared out of eBay simply because the form for listing auctions is so overwhelming (see Figure 8.1).

Figure 8.1 The overwhelming quantity of options on eBay's selling form must intimidate any but the most determined of potential sellers.

Long forms do, however, have two important advantages: efficiency and ease of error reporting. They are efficient in that they require only a single page load and they allow users to view the full set of options without additional navigation. They also enable errors to be detected, reported, and corrected in a single page. These advantages, however, bring with them the high cost of confusion, intimidation, and bewilderment, particularly for users new to the application.

In most cases, the better solution is to identify logical splits in the information so that the form can be presented in multiple pages. What could be presented as a single, lengthy form often turns out to be more manageable as a four-page wizard.

Limit Navigation

As I mentioned in the context of structural models, Web applications are built from two fundamental page types: views and forms. Although a major function of views is navigation, such is not the case for forms. For all the reasons pointed out in Chapter 5, "The Structural Model: Understanding the Building Blocks of a Web Interface," the number of navigation options on form pages should be severely restricted. This applies to high-level navigation elements, such as tab bars or trees, as well as low-level navigation. If your form includes a navigational header or other ways to exit the form, at least some of your users are likely to fill out the form and then click one of the navigation paths without clicking the Submit button first. When this happens, it's impossible to know for sure if they meant to submit their changes but simply forgot to click the Submit button, or if they really meant to abandon the transaction. Even if the application is smart enough to trap every possible click out of the form and perform the submit behind the user's back, the basic problem remains: Exiting a form without using a command button creates ambiguity as to whether changes should be accepted or abandoned. Of course, you can't control the user exiting the form by way of the Back button, a bookmark, or typing in a new URL, but treating forms as modal dialog boxes with limited navigation and explicit Cancel and Submit buttons at least helps limit the problem.

Indicate Status and Progress

If a form is part of a guide or a wizard, it should include clear indications of progress. If users are in step one of a seven-step process, it's only polite to let them know where they are and how many steps are left. Even when some steps are optional—choosing gift wrapping, for example—it is still important to inform users of the number of possible steps. The goal should always be to set appropriate expectations for users so that they feel some level of control over what is happening.

Figure 8.2 from the Opodo travel site is a great example of a progress indicator. Notice how the current step and all the possible steps are indicated in the progress bar.

Figure 8.2 A clear indication of where users are in the process sets appropriate expectations and keeps them in control of the experience.

Support Intelligent Flow and Keyboard Navigation

Well-designed forms also demonstrate balanced flow and intelligent ordering of elements. The user should be clearly drawn from the top of the form toward the bottom. Although a layout that draws the user across the page is possible, the established Web convention clearly favors vertical layouts.

In addition to enhancing their digestion of the experience, well-designed flow also enables users to quickly navigate through the form from their keyboards. This allows more sophisticated users to quickly progress through the form without having to move their hands back and forth between the keyboard and the mouse. For applications where users repeatedly interact with a form, this is particularly important. For example, the Compose Message page of an email application is a form users will interact with over and over again. Being able to use keyboard navigation to move through the form's input controls enhances the interaction's efficiency and speed. To maximize the impact, it is important to consciously design and specify the tab order rather than rely on the browser's default behavior.

Provide Multiple Clues

Another key to form design is to make the use of input controls as clear as possible through the use of clues such as labels, examples, and sizing. One of the easiest things to get right—and wrong—is the label for an input control. Although the subject of labels is actually a component of Layer 9: Text, it is still worth noting here that a major factor in creating clear forms is labeling input fields appropriately.

Providing examples of the expected input when there might be confusion is important, too. For example, a text field for an email address should be labeled "Email" and should include a sample of the data, such as "yourname@address.com." Examples are especially important in Web applications because automatically formatting the data for the user is more difficult than in desktop applications. Without some indication of the correct format for the input, users can't be sure of precisely what's being requested. This is particularly true of dates, where so many different standards are in use.

Length is another critical clue you can provide for users. Because text fields can contain any type of text string or number, they offer few clues about the expected input and pose the biggest risk of input errors. However, setting the length of text boxes to a dimension appropriate for the input is one clue you can easily embed in your design. For example, if you have a field for a five-digit zip code, don't use a text box 24 characters wide. By setting the text box to a size appropriate for the input length plus a few characters for editing, you give users another valuable clue to what you're asking.

Finally, indicating which fields are required and which are optional is often useful. The current convention on the Web is to add an asterisk to the field label of required fields. Unfortunately, this convention doesn't work very well when most of the fields are required because you end up with indicators at nearly every field.

Although it's possible to flip the logic and indicate the optional rather than the required fields, this runs counter to the established convention and can create confusion. Therefore, often the best solution is presenting required and optional fields in different areas of the page. Geography again proves to be an effective indicator of difference.

Make Choices Visible

One of the major purposes of forms is to give users a way to view and indicate choices. To support this basic goal, it is important to make the choices as visible as possible. Although the demand for screen real estate is always present, radio buttons, check boxes, and list boxes are the best way to communicate choices. Menus offer the promise of visual efficiency, but they do so by hiding choices, increasing the amount of interaction and exploration required for the task. As a result, they should be used sparingly.

Figures 8.3 and 8.4 illustrate the tradeoffs in using menus. These figures compare the system configuration pages from the Dell Computer and Apple Computer online stores. Although the Apple design benefits from the increased visual economy of menus, the Dell site more effectively communicates the available choices, thus reducing the amount of exploration required of the user.

Figure 8.3 Apple Computer's system configuration page requires the user to explore the different menus to learn about the available options and prices.

Figure 8.4 Dell Computer's online store uses radio buttons instead of menus so that the available configuration options are instantly visible.

Well-designed forms are a delicate balance of many different factors: the length of the form, the density of the layout, the clear use of input controls, and the flow of information.

  • + Share This
  • 🔖 Save To Your Account