Chapter 12. Forms Follow Function

In This Chapter

  • Creating forms in HTML

  • Creating radio buttons, check boxes, and text fields

  • Adding drop-down lists, Submit/Reset buttons, and jump menus

  • Connecting forms to CGI scripts

  • Working with hidden fields

Forms follow function, to paraphrase the old saying. On the Web, many of the most advanced and interactive features you can add to a Web page require forms to collect information from users — information that can then be used in a variety of ways. Forms are commonly used to create guest books, contact forms, search engine entry fields, chat rooms, and discussion areas.

When you design a form, Dreamweaver makes it relatively easy to create check boxes, radio buttons, text boxes, and other common form elements. You'll also find options in Dreamweaver for specifying text box sizes, character limits, and other features. After you build your form, you may want to consider formatting options, such as CSS (Cascading Style Sheets), to make it look good.

But if you want your form to actually do something, you have to pair it with a program on your Web server. One of the most confusing aspects of working with HTML forms is that they don't do much until you've connected them to a script. Most forms are processed by Common Gateway Interface (CGI) scripts or some other program. These scripts can be written in different programming languages, including C, C#, Java, and Perl. CGI scripts are far more complex than simple HTML files, and even experienced Web designers ...

Get Dreamweaver CS4 For Dummies® 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.