![]() |
|
Forms provide a way for you to ask the user for information and to carry out actions based on what the user enters. For example, you might collect names and e-mail addresses so that you can send information to people about your products. For each person that sends their details, you need to send information to them and, perhaps, add their details to a database. It is not too difficult to use HTML tags to set up a form, but to do anything useful with the information you receive, you must have a script or some sort of program on the server to process the information in the form and respond to it. This is hard and has a nasty taste of programming about it. So, do you know C++ or Perl? Visual Basic? Java? Any CGI language? Find someone that does. You could try http://www.cgi-resources.com/ to see if they have any programs you can use. Search engines, for example, use forms. Tourist information sites often have forms. To create a form, you use the <form> tag to enclose one or more tags that create text boxes, choice lists and so on. Your choices are:
There are some new tags in HTML 4.0 that allow you to group fields in the form together and display them in a different way and to add labels to your fields. The label connects to the form element (for example a radio button); if you click the label, mouse focus moves to the element. Finally, you can set up the tab order of fields in the form. If you press the Tab key, you move through the fields on the form in this order. If you want, you can look at the code for an example form. |
More information Using forms |