• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 11. Forms > About Hidden Fields

About Hidden Fields

HTML forms allow for a special kind of field that doesn't appear in the browser, and yet is part of the form. These hidden fields seem counterproductive at first glance: if your visitors can't see them, how will they fill them in? The answer is they won't. Instead, you will use hidden fields to store information gathered from an earlier form so that it can be combined with the present form's data.

Imagine, for example, that on the first page, you ask for a visitor's name, address, and telephone number. You then want to send them to your catalog page where they can choose which piece of furniture they wish to order. Instead of asking them for their personal data a second time, you can use a CGI script to collect the data from the first form and then generate the hidden fields that will contain this data in the second form. Then, when you go to process the data from the second form, all of the fields, including both the items ordered and the personal data, will be analyzed.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint