Forms: HomeSite
1.2
Overview
| Overview | You can put forms in your web pages to request information
from your visitors. Forms make your web site interactive. |
|
There are many common uses of forms on a web site:
|
||
| However, to gather and retrieve the
information that you request in a form, you need a script that tells the server where to
store the information. The most common type of script used with a web page form is a CGI Script |
||
| CGI Scripts | CGI stands for Common Gateway Interface. The CGI script is a simple computer program that processes the information gathered by the form on your web site. Because this script resides on the web server, you must contact your server administrator to find out how to place a script on your host server. Note that you can display a form on your web site with simple HTML coding. However, you cant actually gather the data in a form without the CGI script that has been installed on the web server to process the data. |
|
| The Form Tag | Create a form with the
<FORM></FORM> tag pair. Within the <FORM> tags will go the entire form, i.e. both the questions you ask and the box and button spaces where the visitor will supply responses. This area is called the form field The fill-in blanks are called form elements. |
|
| The opening <FORM> tag requires two
attributes: ACTION="[CGI script]" where [CGI script] specifies the pathname of the computer program that the server will use to process the form. METHOD="POST"; this attribute tells the browser to process the form. |
||
| You can place many different types of form elements in the same form. | ||
| To create most form elements, use the following
code: <INPUT TYPE="[form]" NAME="[name]"> This code does not require a closing tag. The TYPE attribute specifies the kind of form element (e.g., text box, button, etc.) you want to display. This attribute is required in the tag for each form element. The NAME attribute specifies the class of information (e.g., last name, first name, etc.) being gathered by that particular form element. When the information is processed by the server it will be identified by the term you assign to the NAME attribute. |
||
Forms: HomeSite 1.2
Overview
Create a Form
Create Text and Password Boxes
Create Radio Buttons
Create Checkboxes
Create Drop-down Menu Boxes
Create Text Blocks
Create the Reset and Submit Buttons
Web Design Center
Last Revised: September 18, 1999
© Agatha Taormina