ptg16476052
Using Other Form Controls 345
12
▼
However, sometimes a text box with some JavaScript validation is even better. Most peo-
ple can type their two-letter state abbreviation a lot faster than they can find it in a select
list. Drop-down menus are difficult to use and hide options that people don’t realize they
have. And don’t forget people on small devices like cell phones: A tiny check box could
be just as difficult to tap as it is to scroll through a huge select list.
The other usability issue with select lists is specific to multiple select lists. The bottom
line is that they’re hard to use. Most users don’t know how to select more than one item,
and if the list is long enough, as they move through the list they’ll have problems keep-
ing track of the items they already selected when they scroll through to select new ones.
Sometimes there’s no way around using a multiple select list, but you should be careful
about it.
Exercise 12.2: Using Several Types of Form Controls
Form controls often come in bunches. Although there are plenty of forms out there that
consist of a text input field and a Submit button (like search forms), a lot of the time
forms consist of many fields. For example, many websites require that you register to see
restricted content, download demo programs, or participate in an online community. In
this example, we’ll look at a perhaps slightly atypical registration form for a website.
The purpose of this exercise is to show you how to create forms that incorporate a num-
ber of different types of form controls. In this case, the form will include a text field, a
radio button group, a select list, a check box group, a file upload field, and a text area.
The form, rendered in a browser, appears in Figure 12.21.
FIGURE 12.21
A registration form
for a website.
▼