Chapter 8 - Working with Forms

Form Creation

First you should add form tag. The form tag has several attributes which will allow you to modify how the form works. - pg 186

The form tag <form> and closing tag </tag> must surround all of the form elements. This is how it knows what information to send to the form processor.

Form Elements

Form Accessibility - pg 187, we'll see it in action in a second as we build forms. Can limit the number of characters shown, as well as what can be entered.

Text Fields - uses the input tag. The type attribute is "text", which is the default value, if one is not entered

Labels - are used to allow easier navigation for those who have visual or motor impairments

Fieldsets - are used to group related items together - usually a box surrounds them, and a legend tag can be used to give the grouping a title

Password Fields - also use the input tag. The type attribute is "password"

Text Areas - uses an open and close textarea tag. Can specify a height (rows) and width (columns) for this tag. Good for freeform feedback.

Radio Buttons - allow for only one out of a group of objects to be shown

Checkboxes - allow for yes/no responses

Lists - come as either "Lists" or "Menus" - this is based upon Dreamweaver's notation - it is actually the same tag.