REFERENCES AND EXAMPLES


CREATING A SIMPLE FORM

<form> This begins form
<input> Get the information
<input> Get as much info as wanted
<input> More info for you
</form> End form



SIMPLE MAILTO FORM THAT EMAILS INFO TO YOU

<form method=post action="mailto:My ID [email protected]" enctype="text/plain">
<input>
<input>
</form>
Its a good idea to encrypt email address



CGI FORM HOST METHOD

<form action="ht-p://forms cgi host URL" method="post">
<input type="hidden" name="forms host name" value="encoded gobbledygook">
<input>
<input>
</form>
The forms host encodes their location for web
This method is more difficult but supposedly more reliable



RADIO BUTTONS

<input type=radio name="first input" value="first">First
<input type=radio name="second input" value="second">Second

Example of Radio Buttons
FIRST
SECOND



CHECK BOXES

<input type=checkbox name="good" value="yes">Good
<input type=checkbox name="bad" value="yes">Bad
<input type=checkbox name="ugly" value="yes" checked>Ugly

Example of Checkboxes
GOOD
BAD
UGLY



TEXT INPUT BOX

<input type=text name="item A" size=10>
<input type=text name="item B" size=10>

This makes small box for small info





PULL DOWN LISTS

<form method=post action="mailto:My ID [email protected]" enctype="text/plain">
<select name="best friend"> This makes a pull down list of selections
<option value="best friend"> First name on list
<option value="best friend"> Second name on list
<option value="best friend"> Third name
</select>
</form>

Example of Pull Down List




SCROLLING LISTS

<select name="best friend" size=3> Size attribute limits size of viewed list
<option value="Mary"> First name on list: visible
<option value="Beth"> Second name: visible
<option value="Jo"> Third name: visible
<option value="Sheri"> Fourth name: not visible-must scroll down
<option value="Jane"> Fifth name:not visible-must scroll down
</select>

EXAMPLE OF BEST FRIENDS SCROLLING LIST
Jo has been selected to be default-highlighted


Now the choice needs to be submitted, or changed to another choice
Reset Buttons are plain; Submit Buttons can be graphic







SUBMIT AND RESET BUTTONS

<input type=submit>       <input type=reset>
Using an image makes those really cool buttons

<input type=image src="submit.gif">
Be sure to put alt="submit" on the image




COMMENTS OR TEXT AREA

<textarea name="comments" rows=4 cols=30 wrap=virtual>
</textarea>




BROWSE AND UPLOAD FILE FORM

<form method=post action="mailto:My ID [email protected]" enctype="multipart/form-data">
<input type=file name="myfile">
</form>
This tag lets a visitor browse their files, pick one and send it to you
It will not work with all browsers with mailto method




HIDDEN INPUT

<input type=hidden name="myform" value="html forms class">
Gives you message that doesn't show in the form, like location, name of form, or class




Take a class at VIRTUAL UNIVERSITY and learn how to do this!
Explore Virtual University

Navigation:
BACK TO TOP OF PAGE
TABLE OF CONTENTS
PAGE TWO
PAGE THREE

Hosted by www.Geocities.ws

1