Web Idea Center


IT Help Center | UD Home | Comment  
Home How to

brain How To
    MENU > 'CONTACT US' FORM TEMPLATE

'CONTACT US' FORM TEMPLATE

NOTE: This form is intended for University use only and will not work from a non-UD web server.

Use this template file to make a basic "Contact Us" form for your web site.

There are three files that work together to make the basic form function.

  1. The form itself. (Template: contactus-form.html)
  2. The thank-you page that the customer sees after the form is submitted. (Template: contactus-thankyou.html)
  3. A page that contains the layout for the form data that gets e-mailed to the recipient. (Template: contactus-form-results.html)

Copy these template files to your working directory and use the directions below to edit them as needed.

  • Open contactus-form.html in your html or text editor.

    1. You may choose to edit the page's title by editing the text between the title tags. (This will change the text displayed in the browser window title bar.). This is an optional change, it is not required.
    2. <title>Contact Us</title>

    3. Assign a vaild e-mail address for the mailto input field by changing the text inside value="". The mailto tag is the address that the form results will be sent to. You can find this line of code (as well as items 3-6) directly under the <form> tag. Be sure that when you are editing these fields, the lines do not wrap (although they may show wrapped here because of fonts, but they should be on one line in the template file). This is a required field.
    4. <input type="hidden" name="mailto" value="name@udel.edu">

      The e-mail address must be a valid UD e-maill address. You may also use an existing department mailing list as well. (ex: it-mis@udel.edu)

    5. Change the html_source link by editing the text inside value="" with the URL of your own results page. Be sure to include the fully qualified path, starting with "http://". This is a required field.
    6. <input type="hidden" name="html_source" value="http://www.udel.edu/directory/results.html">

      The "html_source" page contains the body of the mail message that is sent to the recipient of the form. The field names in this file must match exactly those used in the contactus-form.html file, but you can include any text or instructions to the recipient of the form. Use the contactus-form-results.html template, and edit the text to fit your needs.

    7. Change the returnpage link by editing the text inside value="" with the URL of your own thank-you page. Be sure to include the fully qualified path, starting with "http://". This is a required field.
    8. <input type="hidden" name="returnpage" value="http://www.udel.edu/directory/thankyou.html">

      The "returnpage" is the page that the user is shown upon submitting the form. Usually, this page includes a message that the form was submitted, and some links to direct the user where to go next. An sample can be found at contactus-thankyou.html. This file does not have to reside in the same directory as the contactus-form.html file, but it is a good practice to keep all the form files together.

    9. CC fields allow you to carbon copy up to 10 additional e-mail addresses in addition to the original recipient. They include all udel.edu individual addresses and department lists (i.e. student@udel.edu, it-mis@udel.edu) only. This is an optional field.
    10. Assign a vaild e-mail address for the cc input field by changing the text inside value="". You may use up to 10 cc fields. (Change the number to reflect additional cc's.

      <input type="hidden" name="cc1" value="name@udel.edu">

      <input type="hidden" name="cc2" value="name@udel.edu">

      <input type="hidden" name="cc3" value="name@udel.edu">

      The e-mail address must be a valid UD e-mail address. Outside addresses will not work with this form.

      If you do not wish to use the cc option, simply delete the line of code. If you would like to forward mail to a department mailing list that is not currently setup or are having problems with the list , contact access@udel.edu for assistance.

    11. The "subject" is a required field but you may edit the text inside the subject value="", (This will change the text displayed in each e-mail you receive.)

      <input type="hidden" name="subject" value="From Web: Sample Contact Us Form" maxlength="1024">

    12. You may also edit the page header and instruction text. These are not required changes but it is a good idea to have text relevant to your form and department.

      <td colspan="3"><span class="header">Contact Us Sample form</span> <br><br> <span class="a-body">Put some instructions here. For example "Use this form to send us your questions and comments."</span> </td>

    13. Save all files and test your form.

University of Delaware