Gator Engineering Wordmark
University of Florida Wordmark
 
 
College Home
Finance & Personnel Office
Administration Fiscal Office
Budget & Planning
Contract & Grants Accounting
Personnel & Payroll
Engineering Processing
Management Information Systems


About Us
Staff, Mission, Goals, Contact Info...
  Services
Project Request, Support Agreement...
  Forms / Checklists
Account, Entrance, Exit...
Software Licenses
MSDNAA, Microsoft, Labview, Novell...
  Resources
Training, Web, Email, FAQ, DNS...
  Security
Policy, Unit ISM List...

The webform cgi script is used to process forms on www.eng.ufl.edu. With this cgi-script you can email the results of the form to specified accounts or store the results of the form in a deliminated text file.

To use this script in a webpage, specify the action as "/cgi-bin/webform" in the FORM directive. The perferred method to send information to the cgi-script is POST, but either POST or GET will work.

Parameters are passed to this script to configure it for your use by using hidden fields. For example, to configure a form to add people's first, middle, and last names and nicknames to a text file named names.txt the HTML would look like the following:

<form method=POST action="/cgi-bin/webform">
      
<input name=action type=hidden value="database"> <input name=dbase type=hidden value="names.txt"> <input name=order type=hidden value="first, middle, last, nick"> <input name=webmaster type=hidden value="blah@eng.ufl.edu"> <input name=thankyou type=hidden value="thanx.html"> First Name: <input name=first type=text> Middle Name: <input name=middle type=text>
Last Name: <input name=last type=text> Nickname: <input name=nick type=text>
<input type=submit name=submit value="Submit">   <input type=reset name=reset value="Reset"> </form>
It is important to note that all files associated with a form (the html file, the thankyou file) must be in the same directory. The dbase file must reside in the units logs directory. This is explained below in greater detail and has been done for security reasons. Also note that the key/value pairs of parameters (and submit and reset buttons if given names like the example above) will not be emailed to you.

Be sure to read the note about checkboxes below.

PARAMETERS ASSOCIATED WITH THIS SCRIPT
Independant Parameters
action Accepted values are email for the contents of the form to be mailed to specified addresses or database for the contents of the form to be added to a deliminated text file. The two values can be joined if both actions are required (ie. email, database). Required.
webmaster The email address of the author of the webpage.
thankyou The name of the file which will be sent to the browser when a form is successfully processed. This file should be in the same folder as the form.
required A comma separated list of the names of fields which must be filled in by the browser. If a field is not filled in, an error message will be generated describing which fields were not filled in.
confirm A comma separated list of the field names where the first and second must have the same value entered in the form. The same with the third and forth, etc.
EX. <input name=confirm type=hidden value=' from, cc'>

Action = Database

If you use the webform script to process forms all dbase files will be stored in a logs directory. For our ftp users, just log in and go to /logs. For our local users, this directory can be found on your 'Web' drive usually 'W'. If you can not see this drive and need access to it contact MIS.

dbase The filename in which to store the contents of the form. The file must be created by the webmaster and must have world read and write permissions. Required.
order A comma separated list of the names of files in the order they should appear in the 'dbase' file. Required.
Additional options:
(add following options in list for extra information)
time_stamp: date and time that the form was submitted
submitip: ip address of the computer the submission
doc_uri: url of the form being submitted
separator The character to use to separate the fields in the 'dbase' file. The default separator is a tilda, '~', and is changed with this parameter.

Action = Email
to A comma separated list of email addresses for the TO field in the mail header. Required
cc A comma separated list of email addresses for the CC field in the mail header.
bcc A comma separated list of email addresses for the BCC field in the mail header.
rr Hide this parameter in your form and give it any value to have a return receipt to the 'from' address added to the email message (the 'from' parameter must be used).
    <input name=rr value="yes" type=hidden>
subject The subject of the email message which is sent by the form.
from A comma separated list of email addresses for the FROM field in the mail header. This field would typically be filled in by the browser using a textarea field which is named from.
header Whatever is the value of a form object with the name header will appear at the top of the email message. This is usually hidden
footer Whatever is the value of a form object with the name footer will appear at the bottom of the email message. This is usually a hidden.
e-order A comma separated list of the names of fields in the order they should appear in the email message.
Additional options:
(add following options in list for extra information)
time_stamp: date and time that the form was submitted
submitip: ip address of the computer the submission
This field is not required, if not present then the fields will be in the message in what ever order they are recieved by the server. If present, any named field in the form must be present in this list and/or in the 'order' field for the dbase action.

Note about type=checkbox: Checkboxes will only be passed to the webform script if, and only if, they are 'checked'. This means that if a checkbox is used and is not 'checked' then (1) it will not be mailed to you, (2) will result in an error message if it is a required field, and (3) will not showup in your database file. Instead of using checkboxes I recommend using a pair of radio buttons with 'yes' and 'no' values. For example:

Checkboxes
Add me to your mailing list:
Radio Buttons
Add me to your mailing list: Yes   No
  Phone: (352) 392-6000
Fax: (352) 392-9673
College of Engineering
300 Weil Hall, PO Box 116550
Gainesville, FL 32611-6550
 

Last Modified: Sunday, 10-Aug-2008 14:24:42 EDT