Chapter 68. Working with Form Widgets


The little thingies that you click and type text into on a form have a name other than thingies. They're called widgets and occasionally also form fields or form objects. A large part of designing an effective form is being able to identify the various widgets and knowing which ones to use for what kinds of entries.

GEEKSPEAK

Widgets (also form fields or form objects) are the little thingies that you click and type text into on a form.


Table 68.1 runs down the list of HTML widgets, in case you need a refresher. The sections that follow take each widget in turn.

Table 68.1. HTML Widgets

WIDGET

USED FOR

TAG

Button (generic)

Launching a function

<input type="button">

Checkbox

Selecting any number of several options

<input type="checkbox">

File field

Attaching an external file to the form data

<input type="file">

Hidden field

Storing hidden data

<input type="hidden">

Image field

Sending the form data to the Web server

<input type="image">

List

Selecting any number of several options (but usually just one)

<select size="x"></select>

Menu

Selecting any number of several options (but usually just one)

<select></select>

Password field

Entering a password

<input type="password">

Radio button

Selecting one of several options

<input type="radio">

Reset button

Returning all widgets in the form to their default states

<input type="reset">

Submit button

Sending the form data to the Web server

<input type="submit">

Text area

Entering multiple lines of text

<textarea></textarea>

Text field

Entering a single line of text

<input type="text">




Web Design Garage
Web Design Garage
ISBN: 0131481991
EAN: 2147483647
Year: 2006
Pages: 202
Authors: Marc Campbell

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net