Webguide Home | Search
New York University

Web Site Development

Simple Feedback Form

If you would like to add a simple feedback form to your site, you can use our basic form mail script which is located in the main cgi-bin of the NYU Web server. You do not need to have special privileges to run the script, nor do you need to know any complicated programming languages.

You can create your form in the same way you create other Web (html) files. The difference is, in this file, you must include a line of code that tells the Web server that it is, indeed, a form, and that it will be sending information to a specific email address. The file you create will also include specific information about the type of data you wish to collect. For example, you might want your visitors to select information from a list of choices you provide, or you might want them to type in their own information.

Most forms ask for basic information: name, email address, comments. Once you've determined the type of information you wish to collect, you will need to assign logical names (or, variables) to identify this information when it is sent back to you by email. Some of the basic variables are already identified for you, for example:

realname (used to identify someone's name)
email (for someone's email address)

Note: You must NOT collect data of a sensitive nature. This includes Social Security Numbers, University ID numbers, grades, or other personal information.

You will see examples of how these variables are used in the sample form.

To make your form more visually appealing, you can use options like drop-down menus, radio buttons, check boxes or text windows.

To ensure that your form actually sends you the information, there are two required pieces of information that you MUST include in your html file:

  1. The line of code that refers to (or, calls) the formmail script.
  2. Your NetID. This will ensure that all form results are sent to your NYUHome email address. You MUST use your NetID@nyu.edu email address.

This information is considered hidden; it cannot be seen by the person filling out your form. You can also specify that other information be "hidden" . For example, when you receive the results of your form back via email message, you can specify what the email's Subject: line will be by including a line of code in your form. That way, you'll know the piece of email contains information from your form. Another hidden customization you can include is the Web page address (URL) of the Web page to which you send (or, redirect) your visitor after they submit their form. You will see how to specify this information within the form's html code.

Another recommended "hidden" option is to make certain information "required". For example, if you are trying to create a mailing list, you would need address (email or snail mail) information. You might also want the individual's real name and phone number. By making these pieces of information (or fields) required, your visitor will not be able to submit their form without filling out these fields. You will see how to make fields required within the sample form.

Sample Simple Web Form

Here is an example of a simple Web form which uses many of the visual options described above. By using your Web browser's View source option, you can see how to properly configure your form.

You can copy and paste the source file into your own html file. Make sure to replace the sample email address with the email address to which you wish your form results mailed, as well as to change the name of the "subject" for the Subject line on the email that is sent to you to something of your own choosing.

Sample Thank You Page

Here is an example of a Thank You page that you can create to redirect your visitor back to your home page after they submit their form. Make sure to replace the reference to "thanks.html" in the sample form template to the name of the file you create.

Sample Materials

Related Information

You must NOT collect data of a sensitive nature. This includes Social Security Numbers, University ID numbers, grades, or other personal information.