MailTo Forms-Templates and CMS - Carnegie Mellon University

MailTo Forms

MailTo forms allow users to submit information to you directly from your website. In the CMS, you can add forms that will automatically:

  • Send the submission to a specified cmu.edu email address
  • Display a response page after the form has been submitted

Note: This section assumes a basic knowledge of HTML forms and only covers how to integrate a form on your CMS website with the MailTo CGI script. A good resource for more detailed information on HTML forms is w3schools.com's HTML Forms and Input.

The MailTo CGI Script

To create a form you will need to use the MailTo CGI, a script that is written in HTML code that processes form submissions and delivers them to a specified email address. The MailTo CGI script is provided by Computing Services and is supported only when used to send email from forms located on the www.cmu.edu or www.andrew.cmu.edu servers. Using the script on other websites or servers is not supported.

Creating the Form

Integrating a form onto your website will require you to work with the HTML coding of your CMS page. To access the HTML coding, simply click on the HTML Source Editor button of the page in which you are adding the form.

Advanced Code Editor

Build a Form From Scratch

To learn more about building a form from scratch, The MailTo CGI Script page will help get you started. You can then learn how to Customize Your Form and configure the necessary Input Elements you would like to include.

Copy a Pre-Existing Form

The easiest way to add a form to your website is to copy and paste the HTML coding of a pre-existing form. Once pasted onto your page, you can then customize it to meet your specific needs. For forms that have been configured to work on your CMS website using the MailTo CGI script, please refer to the form examples page.

Start Your Form in Dreamweaver or FrontPage

You may use a web authoring program such as Dreamweaver or FrontPage to create the basic structure of your form before pasting the HTML coding onto your CMS page. If you choose to do so, it is recommended that you edit the form to give each field a logical name. Web authoring programs such as Dreamweaver may assign a default name to each field (e.g., textfield1, textfield2, etc.) and by changing the name to something that makes sense to you (e.g., Name, Email, Phone, etc.) future editing will be made much simpler and the incoming form submission will be easier to understand. When naming a field, remember that fieldnames are case sensitive (you may use either uppercase or lowercase letters) and fieldnames must be all one word (no spaces, use dashes instead). Once you've created the form in the program, simply copy the HTML code of the entire form (i.e., from the opening <form> tag through the closing </form> tag) and paste it into the HTML window of your CMS page.