Forms
Forms let you get
feedback from your visitors, they can be used to collect payment information,
to get opinions from visitors (what I have used them for), etc.....
All forms begin
with the tag <form> and ends with the tag </form>. Tags that are
used within those tags are: <input> to specify the input, <fieldset>
</fieldset> to group related sets of form controls and fields, <textarea>
</textarea> to setup text input areas, <select> </select>
to select values from a predefined set of inputs, <button> </button>
to create form controls, <label> </label> to identify form controls
and fields, and <legend> </legend> to create captions for sets of
related form controls.
The input tags let your create text input fields, pull-down menus, check boxes,
etc.....
To make it easier we will look at the code for a form:
<html>
<head>
<title>Form</title>
</head>
<body>
<b><center>Fill out your information</center></b>
<form method="post" action="/cgi-bin/info">
<comment>Now for method you can enter method= "post" or "get",
unless you are using Unix, use post. Action="...." supplies the url
for the cgi script on the server that receives the form's input. Unless you
are advanced programmer you can get free services from different companies to
handle your forms and have the results e-mailed to you (I let geocities handle
it for me</comment>
<p>
Please enter your name:
<input name="fullname" type="text" size="15"
maxlength="25">
<comment>name just categorizes whatever your visitor types in, type tells
us what type of choices they will have for input (ex. textbox, checkboxes),
size tells us the length of the textbox, and maxlength limits the number of
characters that are allowed to be typed in that textbox)</comment>
<p>
<legend>Sport you like the most:</legend>
<select name="sport" size="4" multiple>
<option>Basketball
<option>Football
<option>Baseball
<option>Tennis
<option>Soccer
</select>
<p>
Pick a button for Yes or No
<br>
Yes<input name ="answer" type="radio" value="yes">
<br>
No <input name="answer" type="radio" value="no">
<p>
Computers you like:
<br>
Dell <input name="computers" type="checkbox" value="dell">
Gateway <input name="computers" type="checkbox" value="gateway">
Compaq <input name="computers" type="checkbox" value="compaq">
Self-Made <input name="computers" type="checkbox" value="selfmade">
<p>
<input name="submit" type="submit" value="Submit">
<input type="reset">
<comment>The two above are the submit and reset buttons</comment>
<p>
<a href="forms.html">Back</a>
</body>
</html>
Finished
output - Click here