356 Chapter 8: Getting Input from Users: Forms and Controls
The Patterns
As you might have guessed if you read through the control tables in the preceding section,
most of these patterns describe controls—specifically, how you can combine controls
with other controls and text in ways that make them easier to use. Some patterns define
structural relationships between elements, such as
Dropdown Chooser and Fill-in-the-Blanks.
Others, such as
Good Defaults and Autocompletion, discuss the values of controls and how
those values change.
A large number of these patterns deal primarily with text fields:
Forgiving Format,
Structured Format, Fill-in-the-Blanks, Input Hints, Input Prompt, Password Strength Meter, and
Autocompletion. That shouldn’t be surprising. Text fields are as common as dirt, but they
don’t make it easy for users to figure out what should go in them. They’re easiest to use
when presented in a context that makes their usage clear. The patterns give you many
ways to create that context.
1.
Forgiving Format
2. Structured Format
3. Fill-in-the-Blanks
4. Input Hints
5. Input Prompt
6. Password Strength Meter
7. Autocompletion
The next two patterns deal with controls other than text fields. Dropdown Chooser de-
scribes a way to create a custom control, and
List Builder, referenced in the control table
shown earlier, describes a commonly reinvented combination of controls that lets users
construct a list of items.
8.
Dropdown Chooser
9. List Builder
You should design the remaining patterns into the whole form. They apply equally well to
text fields, drop downs, radio buttons, lists, and other stateful controls, but you should use
them consistently within a form (or within a dialog box, or even an entire application).
10.
Good Defaults
11. Same-Page Error Messages
Patterns from other chapters apply to form design as well. From Chapter 4, Right/Left
Alignment
discusses one way to arrange labels alongside controls. Labels can also be placed
above the form fields (at the cost of vertical space, but with plenty of horizontal room for
long labels), or left-aligned along the left edge of the form. The choice can affect the speed
of form completion.