Saint Mary's College - Notre Dame, Indiana

Instructional Technology Resource Center - Saint Mary's College - Notre Dame, Indiana
 
 


NOTE!! This Form Service is available only to the Saint Mary's Community

For an overview of forms and form tags see NCSA's Fill-Out Form Support Document


  1. Creating Your Form.
    1. Required Tags
    2. Customizing the Subject of the Mailed Form
    3. Creating Fields that Require Input
    4. Sending the User to a New URL After Successful Form Submission
  2. Viewing and Replying to Responses from Your Form
    1. Via Your Personal Email
    2. Via the Guestbook Service
    3. Verifying Before Submitting
  3. About the Saint Mary's Forms Service
Creating Your Form
  • Required Tags

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

      <FORM method=POST action="/server-bin/feedback.cgi">
      <input type="hidden" name="$SMCmethod" value="email">

    • 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.

    eg. <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.

    
    Eg.This form will not be accepted until you make an entry in all 3 fields.
    
    St. Address : 
           City : 
            Zip : 
    
    
    

    The tags:

    
    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.

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

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


Viewing and Replying to Responses from Your Form

  • Via Your Personal Email
    • The e-mail address is your SAINTMARYS.EDU e-mail address. If your e-mail address does not end with "@saintmarys.edu", you can contact the Help Desk to learn about activating your saintmarys.edu e-mail address.

      The e-mail responses always originate from the e-mail address "wwwforms@www.saintmarys.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 Eudora 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.

  • Via the Guestbook Service
    • You can also create an HTML document that is appended with the submissions from your form. One way this might be used is for a guestbook.

      To use this method use "file" as the $SMCmethod.

        Eg. <input type="hidden" name="$SMCmethod" value="file">

      To access the text file: http://www.saintmarys.edu/server-bin/showme.cgi/[partial_form_url] where partial_form_url is the path part of the form URL.

        Eg. For a form http://www.saintmarys.edu/~userid/guestbook.html the guestbook would be accessed with the url http://www.saintmarys.edu/server-bin/showme.cgi/~userid/guestbook.html

      The html generated from the form is stored in your home directory in a directory named WWW/FORMS. Each of your pages will be stored in FORMS/formname.html.

  • Verifying Before Submitting
    • You can also view the entered data before submitting to make sure the information is correct and to also use the browsers Print function to print a copy.

      To use this method use "verify_file" or "verify_email" as the $SMCmethod.

        Eg. <input type="hidden" name="$SMCmethod" value="verify_file">

      Use the browsers Back button to go back and make any changes.


    About the Saint Mary's 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 (Eg. C, C++, Perl, Tcl, Fortran, Shell). The minimum requirement is that it is executable on the Web server platform.

      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 Saint Mary's 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 text file.

      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 www@saintmarys.edu.


Did you find this tutorial: very helpful somewhat helpful not helpful
Suggestions/Comments: