O'Reilly logo

Learning Web Design, 3rd Edition by Jennifer Niederst Robbins

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

CHAPTER 9 FORMS

IN THIS CHAPTER

How forms work

The form element

POST versus GET

Variables and values

Form controls, including text entry fields, buttons, menus, and hidden data

Form accessibility features

A word about form layout

It’s hard to go on the Web without encountering some sort of form, whether you’re making a purchase, signing up for a mailing list, or requesting product information. Although forms have a wide range of uses, from simple search boxes to complex online shopping interfaces, they are all built out of the same components.

This chapter introduces web forms, how they work, and the markup used to create them.

How Forms Work

There are two parts to a working form. The first part is the form that you see on the page itself. Forms are made up of buttons, text fields, and pull-down menus (collectively known as form controls) used to collect information from the user.  Forms may also contain text and other elements.

The other component of a web form is an application or script on the server that processes the information collected by the form and returns an appropriate response. It’s what makes the form work. In other words, putting up an (X)HTML page with form elements isn’t enough. Web applications and scripts require progamming know-how that is beyond the scope of this book, however, the Getting Your Forms to Work sidebar later in this chapter provides some options for getting the scripts you need.

From data entry to response

If you are going to be creating web ...

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