Create Web Forms

icon10

OIT has an active project to replace NetFile web publishing with a new service. Learn more at http://oit.nd.edu/web-publishing-replacement/



NOTE: This service is only available to members of the Notre Dame community.

Creating Your Forms
Customizing the Subject of a Mailed Form
Creating Fields that Require Input
Sending the User to a New URL After Successful Form Submission
Forwarding Email to Another Recipient at Form Submission
Obtaining Sender's Real Email Address
Viewing and Replying to Responses from Your Form
About the Notre Dame Forms Service

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" />


If you need to specify the server name in the action field, you may use
<FORM method=POST action="http://www3.nd.edu/cgi-bin/forms/feedback.cgi">

Include the remainder 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 "value=" is omitted, 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 email 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 email 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 the form user needs to fill in or select certain fields in your forms, you can enable a mandatory option for those fields by using the pre-defined hidden field $mandatory.

 Eg.This form will not be accepted until you make an entry in all 3 fields.
 
St. Address : 
       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 user submits the form, 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 Email to Another Recipient at Form Submission

By default, the email 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 Email 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 the user's real email address will appear in the mailed form. This only works for ND users.

Viewing and Replying to Responses from Your Form

Via Your Personal Email

The form recipient email address is your ND.EDU email address. However, if you are using a vanity URL to serve your web contents, you should notify the OIT HTTP Service team to map the vanity URL to your NetID email account so that the mailed form can be sent to you. The email responses originate from the email address "wwwforms@nd.edu," since there is no guaranteed way to authenticate the email address of your form user. If you trust the form users and would rather see the sender's email 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 email programs will let you sort email so that submissions from your form will go into a predetermined mailbox upon receipt.

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

Via the .wwwinbox Folder in Webfile

Instructions for configuring a .wwwinbox folder are available on the Using Web Forms on Pages Stored in Netfile page.

About the Notre Dame Forms Service

Traditionally, you need to write a CGI (Common Gateway Interface) program to handle submissions from web forms. You can write a CGI program 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 that 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 email 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 suggestions for the improvement of this service please send them to oithelp@nd.edu.

 

Top of Page