O'Reilly logo

Dreamweaver 8: The Missing Manual by David Sawyer McFarland

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding Form Elements

Unless you've never used a computer before, the different user-interface elements available for HTML forms should look familiar (Figure 10-4): text fields where people can type in information (their names, addresses, phone numbers, and so on); checkboxes for making multiple-choice selections; and menus for picking items from a list. The Forms tab of the Insert bar lets you create all of these elements and more (see Figure 10-2).

Forms collect information using a variety of different interface elements like text boxes, password fields, and pull-down menus. You can even add a File Field to let visitors select and upload a file to your site.

Figure 10-4. Forms collect information using a variety of different interface elements like text boxes, password fields, and pull-down menus. You can even add a File Field to let visitors select and upload a file to your site.

What All Form Elements Have in Common

Adding form elements to your document always follows the same pattern:

  1. In the document window, insert a form (see Section 10.2).

    Or, if the page already has a form, click inside its red border.

    Tip

    If a text field is the first element of the form, you can skip this step. As soon as you add a form element, like a field, checkbox, or pop-up menu, to a page that doesn't yet have a form, Dreamweaver asks if you'd like to add the proper form tag. Click the Yes button, and Dreamweaver automatically creates the red, dotted-line form boundaries (and, behind the scenes, the corresponding <form> tags). You should always click the Yes button. A form field that isn't surrounded by the proper form ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required