RIT Home

Directories

Info Center/SIS

RIT Library home page RIT home page RIT institute directory RIT Student Information Service RIT Libraries Wallace Library Cary Collection RIT Archives

RIT Forms Tutorial

Look at some real service forms to see how they can be used:

1.) RIT Library User Survey: http://wally.rit.edu/general/usersurvey.html
2.) Comments to Library WebMaster: http://wally.rit.edu/general/feedback.html
3.) Evaluation of Open Computer Workshops: http://wally.rit.edu/instruction/evaluations.html
4.) RIT Student Application for Library Computer Jobs http://wally.rit.edu/depts/via/staff/hiring/sysjobs.html
5.) Library Material Purchase Suggestion Form: http://wally.rit.edu/depts/ref/research/onlineorder.html

Look at other forms for examples.

  1. Go to them in Netscape.
  2. Select View/Source (Page Source)
  3. Copy and paste them into a text or HTML editor.
  4. Be sure to change the email value to go to you and be sure you use the RIT CGI gmail.cgi Form Action or write your own CGI to process your form.
Web Forms need two parts to work:
    Part I: The web page form
    Part II: a CGI program to process the information.
    Part I: The web page form elements can include:
    1. fill-in the blanks


    2. pop-up menus


    3. radio buttons:
      Do you know ASL? Yes OR No

    4. check boxes:
      Check what you need help with:
      Homework
      Project
      Final Exam

    5. text areas:
      Write your short essay below:


    6. The form will also have a submit and reset button which you will see in the example. or

    Part II: Processing the form information:

    Once a form on a web server is filled in and submitted, a server CGI (Common Gateway Interface) set in <form action=>, processes the data collected.

    At RIT, a CGI program called gmail.cgi exists for RIT users to point to from their web forms.

    This program will take the information from RIT web forms and mail it to the designated user.

Modifying Your First Web Form
  1. Highlight the following form HTML code by click dragging over it.
  2. Select Edit/Copy in your browser.
  3. Paste it into a text editor or HTML editor such as Pagespinner or FlexED.
  4. Find the put_your_name_here and type in your first and last name.
  5. Find the two places that have your_username Replace it with your own username on grace.rit.edu. (abc1234)
  6. Change text around the tags that you want to customize. Leave tags alone for now.
  7. Save your changes and ftp the form document to your grace account in the www directory. For help see: Loading a web page to grace at http://wally.rit.edu/instruction/web/editors/loadgrace.html

<HTML>
<HEAD><TITLE>Web Feedback Form</TITLE> </HEAD>

<BODY TEXT="000000" BGCOLOR="#FFFFFF" >

<center> <H2>Feedback to Web Page Maintainer</H2></center>

This form allows you to send automatic mail to [put_your_name_here], at Rochester Institute of Technology. Please use this form to report problems with this web page or to make suggestions or comments about the Web design or content. <P>

<FORM Action="http://www.rit.edu/cgi-bin/gmail.cgi" Method="POST">

This mail will be sent to
<INPUT Type="hidden" Value="your_username@rit.edu" Name="mailto">

the web page author (for problems or comments with this web page)<p>

<input type=hidden name=redirect value="http://www.rit.edu/~your_usename">


This is a <SELECT Name="Type">
<OPTION>Comment
<OPTION>Suggestion
<OPTION>Problem Report
</SELECT>

<PRE>

Please enter your first and last name: <INPUT Type="text" Name="Name" Size=30><BR>

Please enter your e-mail address: <INPUT Type="text" Name="email" Size=30><BR>

Please enter a subject for your message: <INPUT Type="text" Name="subject" Size=30><BR>

</PRE>

Please check all the apply:<br>

<input name="RIT_Faculty" type="checkbox" value="yes">I am an RIT faculty member<BR>

<input name="RIT_Staff" type="checkbox" value="yes">I am an RIT staff member<BR>

<input name="RIT_Student" type="checkbox" value="yes">I am an RIT student<BR>

<input name="Outside_RIT_Other" type="checkbox" value="yes">Other, Please tell me where you are from:<BR>

<TEXTAREA NAME="Other_explain" ROWS=2 COLS=35></textarea><p>

I would like a response to my comment or suggestions. <INPUT Type="radio" Name="Respond_by_Email" Value="Yes">Yes OR <INPUT Type="radio" Name="Respond_by_Email" Value="No">No <br><br>

Please enter the text of your message in the space below. The text will scroll, so you have space.<P>

<TEXTAREA Name="Text" Rows=5 Cols=70></TEXTAREA><BR> <BR>

Thank you. Please <INPUT Type="submit" Value="Press to Send"> or <INPUT Type="reset" Value="Press to Reset">

</FORM> </BODY> </HTML>

What you get back in mail:

From: RIT On-Line Email 

Subject: Great Page 

To: you@ritvax.isc.rit.edu 

Reply-to: abc1234@ritvax.isc.rit.edu 



Received: 10/23/97

mailto: mlfwml@rit.edu

redirect: http://www.rit.edu/~mlfwml 

type: Comment 

name: Abby Conway 

email: abc1234@rit.edu 

subject: Great Page 

rit_student: yes 

respond_by_email: Yes 

text: This a helpful page. Will you be adding more links related to  

HTML publishing? 

Thanks, Abby Conway 

----------------------------------------------- 

REFERER:    http://www.rit.edu/~your_username/formtest.html

Reference of Form Elements:

Form Element Explanation
<FORM Action="http://www.rit.edu/cgi-bin/gmail.cgi" Method="POST"> Form Action is a required element that points to the program on the web server that will process the form information. gmail.cgi can only be used within the rit.edu domain.
<INPUT Type="hidden" Value="your_username@rit.edu" Name="mailto"> This line will not show in the form because it is hidden, but is required. The value= the internet address to send to Name="mailto" is a requirement of gmail.cgi
<input type=hidden name=redirect value="http://www.rit.edu/~your_usename"> This hidden value is optional. After the form is submitted, this is the designated URL is where the user will be returned. If you do not designate a URL a simple thanks page with a return link to the RIT homepage will appear.
This is a <SELECT Name="Type"> <OPTION>Comment
<OPTION>Suggestion
<OPTION>Problem Report
</SELECT>
This is a pop-up menu. Option are the items that appear in the list.
Please enter your e-mail address: <INPUT Type="text" Name="email" Size=30><BR>

Please enter a subject for your message: <INPUT Type="text" Name="subject" Size=30><BR>

Fill-in the blank. The type is text. The name should designate what information you are collecting (name, email, subject, etc.) Size=30 is the size of the blank. Use a number of your choice.
Please check all the apply:<br>

<input name="RIT_Faculty" type="checkbox" value="yes">RIT faculty<BR>

<input name="RIT_Staff" type="checkbox" value="yes">RIT staff<BR>

Checkboxes allow more than one response. Name should be different showing what they choose, type=checkbox and value is always yes. Type text next to the tag for the choice (can be same as name)
<INPUT Type="radio" Name="Respond_by_Email" Value="Yes">Yes OR <INPUT Type="radio" Name="Respond_by_Email" Value="No">No < Radio buttons allow one choice of many. The name must be the same. Type is radio button and Values are different. (yes, no or 1,2,3,etc.)
<TEXTAREA Name="Text" Rows=5 Cols=70></TEXTAREA><BR> Text Area is a scrollable writing area. Size is designated by different numbers of rows and columns.
<INPUT Type="submit" Value="Press to Send"> or <INPUT Type="reset" Value="Press to Reset"> Submit and Reset buttons. Type is submit or reset. Value= wording to appear on buttons

Other References:

See gmail help at http://www.rit.edu/ServResources/IPGuidelines/gmail.html This is recommended reading before customizing your own forms.

Carlos' Forms Tutorial at: http://robot0.ge.uiuc.edu/~carlosp/cs317/cft.html


Maintained by: Joseph Gawlowicz, jagwml@rit.edu (page updated: 2/2002)