This document as been archived from previously offered UTS training course(s) and is NOT updated or supported.

For information about current course offerings, please visit: UTS Training

For current versions of course handouts, please visit: UTS Training Course Handouts


Collecting Information with Forms

Carol Taylor, Instructor


Learning Objectives


Key Concepts


Lesson Plan


Gathering information with a form

Information filled in on-screen

Each form consists of a pair of files:

Special forms tags

The syntax for the <FORM></FORM> tag is:

<FORM METHOD="POST" ACTION=
"http://www.du.edu/cgi-bin/cgiemail/myunitsite/mytextfile.txt">
	
	Your form (and other kinds of) tags go here
</FORM>

Click here to look at the sample form file.

EXERCISE: Save and edit the sample form file.
  1. Log on to your account on Agora.
  2. Enter the command cd public_html to change to your public_html subdirectory
  3. Enter the command lynx http://www.du.edu/classes/forms
  4. Use the spacebar and/or down arrow key to locate and view the sample form
  5. Press \ to view the sample form as HTML
  6. Press p to "print" the sample form
  7. Select Save to a local file by pressing Enter
  8. Accept the default file name by pressing Enter
  9. Use the spacebar and/or down arrow key to locate and view the sample text file
  10. Press p to "print" the sample text
  11. Select Save to a local file by pressing Enter
  12. Accept the default file name by pressing Enter
  13. Press q to quit lynx
  14. Set the permissions on the saved files by entering the command chmod 644 smplform.*
  15. Edit the sample form by entering the command pico smplform.html
  16. Replace **** with your login in the FORM tag
  17. Replace #### with smplform in the FORM tag
  18. Test and edit again as needed
  19. Try adding new form tags

INPUT, SELECT and TEXTAREA tags are used inside <FORM…></FORM> tags

Here is a sample of an INPUT tag:

<INPUT TYPE="radio" NAME="dutype" VALUE="Faculty"> Faculty
<INPUT TYPE="radio" NAME="dutype" VALUE="Non-Exempt"> Non-Exempt
<INPUT TYPE="radio" NAME="dutype" VALUE="Exempt"> Exempt
EXERCISE: Edit the sample html file and add a set of INPUT tags within the <FORM></FORM> tags. Create either a radio or checkbox type of input.

EXERCISE: Look at the sample form file. Choose one of the other INPUT tag types and add it to your form.

The RESET and SUBMIT buttons

The second file in the pair of form files formats the mail message (.txt file)

	To:
	From:
	Subject:
	To: [email_address]

Look at a sample text file.


Return to Lesson Plan



Sample Files and Further Information

Click on any of the following files then select File, Save As from the Netscape menus (or Print, Save to Disk if you are using lynx) to save the file.

smplform.html (Sample HTML form file)

smplform.txt (Sample .txt for use with form)

We obtained our forms processing program (cgiemail) from MIT. Visit their cgiemail page for additional information. You DO NOT need to download the software, it is already installed on our server.


Revised February 19, 1997