Chapter 10. Forms

A Web site is a great way for you to broadcast a message, announce a new product, post late-breaking news, or just rant about the state of the world. But that’s all one-way communication, which you may find a bit limiting. You may be curious to get some feedback from your audience. Or you may want to build your business by selling your product through the Internet as well as the traditional channels, so you need a way to gather customer information. If you want to receive information as well as give it, it’s time to add forms to your Web design repertoire (see Figure 10-1 for a simple example). Whatever type of information you need to collect on your site, Dreamweaver’s form objects make the task easy.

A form can be as simple as a single empty text box (a field) and two buttons for entering a word to search a Web site, or as complex as a 100-question survey composed of fill-in-the-blank and multiple-choice questions.

Figure 10-1.  A form can be as simple as a single empty text box (a field) and two buttons for entering a word to search a Web site, or as complex as a 100-question survey composed of fill-in-the-blank and multiple-choice questions.

Form Basics

A form begins and ends with the HTML <form> tag. The opening <form> tag indicates the beginning of the form and sets its properties; the closing </form> tag, of course, marks the form’s end.

In between these tags, different objects provide the basic user interface elements—the design—of the form. Radio buttons, text fields, and pull-down menus (also called pop-up menus) are just a few of the ways you can gather input. It’s perfectly ...

Get Dreamweaver MX: The Missing Manual now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.