For Example:
<FORM METHOD="POST" ACTION="survey.cgi">
The <FORM> tag must be included in the body of the HTML document such as:
<!DOCTYPE
HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Title of Survey</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<form action="survey.cgi"
method="POST">
Questions
and text here...
</form>
</body>
</html>
Example of a single-line open end, or text field:
The code for this text field:
Please enter your name:
<input type="text"
name="UserName" size="35" maxlength="50" value="">
The parameters and their functions are:
Please enter your base salary:
<input type="text"
name="BaseSalary" size="15" maxlength="15" value="$">
Useful for collecting large amounts of text.
Example of a text area:
The HTML code used to generate this question looks like this:
<p>
<input type="checkbox" name="AppSource" value="1">Newspaper
<input type="checkbox" name="AppSource" value="2">Recruiters
<input type="checkbox" name="AppSource" value="3">Web Resume Banks
<input type="checkbox" name="AppSource" value="4">Magazines
</p>
The Input type specifies which type of response choice to use. In this example, we used "checkboxes". The name="AppSource" parameter indicates the name of the field that will be returned to the software when the form is submitted. For clarity, it should refer to the Question stem or number. The value="1quot; tells the web browser what value to send for those items that are selected.
The HTML code used to generate this question looks like this:
<p>
<input type="radio" name="AppSource" value="1">Newspaper
<input type="radio" name="AppSource" value="2">Recruiters
<input type="radio" name="AppSource" value="3">Web Resume Banks
<input type="radio" name="AppSource" value="4">Magazines
</p>
The only difference between the code for the checkbox and the radio button is the input type. The Radio buttons only allow a respondent to select one alternative.
<BR>
Select your state:
<select name="State">
<OPTION VALUE=>
<OPTION VALUE=AL>Alabama
<OPTION VALUE=AK>Alaska
<OPTION VALUE=AZ>Arizona
<OPTION VALUE=PA>Pennsylvania
<OPTION VALUE=MN>Minnesota
</select>
<BR>
<BR>
Your Department:
<SELECT NAME="Department" ><OPTION>
<OPTION VALUE="1" >Accounting
<OPTION VALUE="2" >Sales
<OPTION VALUE="3" >Marketing
<OPTION VALUE="4" >Administration
<OPTION VALUE="5" >Field Service
</SELECT>
<BR>
<BR>
Years of Service
<SELECT NAME="Service" ><OPTION>
<OPTION VALUE="1" >0 - 5 years
<OPTION VALUE="2" >6 - 10 years
<OPTION VALUE="3" >11 - 15 years
<OPTION VALUE="4" >16 - 20 years
<OPTION VALUE="5" >21 - 25 years
<OPTION VALUE="6" >26 - 30 years
<OPTION VALUE="7" >31 plus years
</SELECT>
<BR>
<BR>
Age (optional)
<SELECT NAME="MyAge" ><OPTION>
<OPTION VALUE="1" >Less than 20 yrs
<OPTION VALUE="2" >20 - 25 yrs
<OPTION VALUE="3" >26 - 30 yrs
<OPTION VALUE="4" >31 - 35 yrs
<OPTION VALUE="5" >36 - 40 yrs
<OPTION VALUE="6" >41 - 45 yrs
<OPTION VALUE="7" >46 - 50 yrs
<OPTION VALUE="8" >51 - 55 yrs
<OPTION VALUE="9" >56 - 60 yrs
<OPTION VALUE="10" >61 plus
</SELECT>
<BR>
The most common form is the submit button and appears in its most simplest form as:
<BR>
<input type=submit value="<< Previous">
<input type=submit value="Save">
<input type=submit value="Cancel">
<input type=submit value="Calculate">
<input type=submit value="Exit">
<input type=submit value="Reload">
<input type=submit value="Next >>">
<BR>