University of Notre Dame > OIT

Office of Information Technologies

services banner security banner

RSS Feed
Subscribe to the OIT Security Alerts RSS Feed

OIT Home > Web Hosting & Publishing > Web Forms Service

Web Forms, Guest Book, & Survey Service

Note: This service is ONLY available to members of the Notre Dame community.

 

Creating Your Forms

Required Tags

Begin the form area of your page with the following tags:

<FORM method=POST action="/cgi-bin/forms/feedback.cgi">
<input type="hidden" name="$NDmethod" value="e-mail">

Include the rest of your form (input areas), followed by submit and reset buttons.

<input type="submit" value="Submit"> <input type="reset">

The "value=" portion of these tags is optional, if left off the button will show a name equivalent to the "type=" value as indicated in the above example.

Customizing the Subject of the Mailed Form

The default subject of the e-mail message you receive when the form is submitted is the URL of the form. Since every form will have a unique URL this results in a unique subject header in the e-mail messages from each of your forms. You can change this by using the $subject hidden field.

Example:
<input type="hidden" name="$subject" value="My favorite Subject">

Creating Fields that Require Input

If certain fields in your forms need to be filled or selected by the form user, you can enable a mandatory option for those fields by using pre-defined hidden field $mandatory.

City : Zip :

The tags for the above form are:

St. Address : <input type="text" name="address" size=40>
City : <input type="text" name="city" size=40>
Zip : <input type="text" name="zip" size=10>
<input type="hidden" name="$mandatory" value="address, city, zip">
<input type=submit value="Submit Address">

Sending the User to a New URL After Successful Form Submission

After the form is submitted, you can send the user to another URL with the '$next_url' option. This option will be executed only when the form submission is successful.

Example:
<input type="hidden" name="$next_url" value="http://www.nd.edu/">

In the above case, a continue hyperlink will be shown to the user after the form is submitted. In the above example, clicking on continue will navigate the user to Notre Dame Home page. You can use the 'value' field to point to any valid URL.

You may also directly send user to a new URL without any user action by using the following tag:

<input type="hidden" name="$goto_next_url" value="http://www.nd.edu/>

Forwarding E-mail to Another Recipient at Form Submission

By default, the e-mail form submission will be sent to the owner of the 'www' folder where the form is published.  If you need to send the form elsewhere, you have the following options:

When the form is submitted, you can send the form submission to a designated recipient by using the following tag:

<input type="hidden" name="$recipient" value="netid@nd.edu">

Insert the email address you prefer where we have placed netid@nd.edu. 

Or, if you prefer, when the form is submitted, you add another recipient with the '$CCrecipient' option.

Example:
<input type="hidden" name="$CCrecipient" value="netid@nd.edu">

Insert the email address you prefer where we have placed netid@nd.edu. 

Obtaining Sender's Real E-mail Address

If you use the secure web site of https://www3.nd.edu and set the form action as:

<FORM method=POST action="/cgi-bin/forms-s/feedback.cgi">

It will force the user to authenticate and user's real e-mail address will show up in the mailed form. Of course, this only works for ND users.

Viewing and Replying to Responses from Your Form

Via Your Personal Email

The form recipient e-mail address is your ND.EDU e-mail address. However, if you are using a vanity URL to serve your web contents, you should notify OIT HTTP Service team to map the vanity URL to your NetID e-mail account so that the mailed form can be sent to you. The e-mail responses originate from the e-mail address "wwwforms@www.nd.edu", since there is no guaranteed way to authenticate the e-mail address of your form user. If you trust the form users and would rather see the sender's e-mail address in the response, you can add the following line to your form.

<input type="text" name="$from_email" size=40>
<input type="text" name="$from_name" size=40>

Which should look like the input fields below:

Your E-mail Address: 
     Your Full Name: 

TIP: The filtering capabilities of most e-mail programs will let you sort e-mail so that submissions from your form will go into a predetermined mailbox upon receipt.

BEWARE!: We have no way to authenticate the e-mail address and name input by the user at the form submission time unless you use the setting mentioned above to capture user's real e-mail address.

Via .wwwinbox Storage in your File Space

** Please note: If your site is stored in NetFile, please also follow some special instructions for .wwwinbox storage here.

You can also create a file that is appended with the submissions from your form. One way this might be used is for a guest book. To use this method use afs_single_folder as the $NDmethod.

Example:
<input type="hidden" name="$NDmethod" value="afs_single_folder">

The file generated from the form is stored in your AFS space in a directory named .wwwinbox/feedback. Each of your pages will be stored in feedback/path/formname.html. (E.g., feedback/forms/guestbook.html)

Other choices to store forms content are:

<input type="hidden" name="$NDmethod" value="csv_file">

It will save the form content as comma-separated and value-in-double-quoted fields.

<input type="hidden" name="$NDmethod" value="afs_folder">

It will save form contents in separate files.

About the Notre Dame Forms Service

Traditionally you need to write a CGI (Common Gateway Interface) program to handle submissions from web forms. A CGI program can be written in your favorite language (e.g., C, C++, Perl, Tcl, Fortran, Shell). The minimum requirement is that it is executable on the Web server platform (ours is running Solaris 2.8 at this time).

CGI is a privileged service due to the security concerns that are introduced by this interface. Since we have received a large number of requests for forms capability from our user community we have developed this generic solution which gives forms capability to any user without the need for custom CGI programs.

This service has been implemented so that any Notre Dame user can deploy HTML forms in their www directory in the same way as other HTML files. FORM providers can currently view the feedback from Web users via personal e-mail or a WWW Inbox Service.

Our goal is to provide a functional www forms service that does not require you to write a CGI program to handle the output of your forms. If you have any suggestions for the improvement of this service please send them to oit@nd.edu.

 
 

Office of Information Technologies - University of Notre Dame
P.O. Box 539, Notre Dame, IN 46556    Phone: 574-631-5600   Email: oit@nd.edu