Formmail.asp Instructions

This script is named formmail.asp and it is located at http://www.mccinfo.net/webresources/cgi-bin/formmail.asp.  It can be controlled and customized using the input tags described in the table below. 

Setting Up the Form

The first step is to set the form action and method in the <form> tag. This should be set as follows:
<form method="post" action="http://www.mccinfo.net/webresources/cgi-bin/formmail.asp">

NOTE:  You will need to upload your forms that are processed using this script to the server to test them. 

The following fields are recognized by the script:

Input name Description
recipient Only field required by the script. This form field allows you to specify to whom you wish for your form results to be mailed. To send the form to multiple recipients separate them with a comma.

Example:
<input name="recipient" type="hidden" value="username@mail.mccneb.edu" />

subject Subject of the email message. Use input type="text" if you want the user to be able to set the topic. Use type="hidden" if you want to set the subject line

Example:
If you wish to choose what the subject is: <input type="hidden" name="subject" value="Your Subject" />

To allow the user to choose a subject: <input type="text" name="subject" />

realname The name of the user filling out the form as entered by the user.

Example:
<input name="realname" type="text" />

email This form field will allow the user to specify their return e-mail address. If you name the text field "email", the ASP script will require that the format of the email address entered be in a valid format.  This also makes the email input field a required field.  If you don't want this field to be required, use a slightly different name for the the input field.  Something like "emailaddress" could be used.

Example:
<input name="email" type="text" />

comments Textarea or field with the actual message of the sender
required Defines what input fields must be filled out by the user. Use a comma-delimited list for the value, for example value="email,realname,phone"

Example:
<input name="required" type="hidden" value="email,info,realname" />

redirect

Specify a URL in this field to redirect the user to a specific page once the email has been successfully sent, rather than showing the default "thank you" page. The value can be an absolute or relative path.  If you use a relative path, it is relative to the location of the ASP file.  It is recommended you use an absolute path pointing to the response page as shown in the example below:

Example:
<input name="redirect" type="hidden" value="http://www.mccinfo.net/info1311/forms/response.htm" />

hide_blanks

Hides blank fields in the emailed results. If you add this field to your form with a value of "1" fields not filled out by the user are not printed in the body of the email message.

Example:
<input type="hidden" name="hide_blanks" value="1" />

bgcolor Background color of the return page.

Example:
<input name="bgcolor" type="hidden" value="#FFFF99" />

background Background image of the return page. Must be a complete URL

Example:
<input name="background" type="hidden" value="http://student.mccinfo.net/username/marble.jpg" />

text_color

Color of text on the return page.

Example:
<input type="hidden" name="text_color" value="#000000" />

link_color

Color of links on the return page.

Example:
<input type="hidden" name="link_color" value="#FF0000" />

vlink_color Color of visited links on the return page.
alink_color Color of active links on the return page.
title Title of the return page.

Example:
<input name="title" type="hidden" value="Thank you for taking the time to complete the form.  Below is the information that you submitted.  Please print this page and keep it for your records." />

return_link_url The URL of the page the user gets to from the return page.

Example:
<input name="return_link_url" type="hidden" value="http://student.mccinfo.net/wstudent/" />

return_link_title Title of the return link.

Example:
<input name="return_link_title" type="hidden" value="Home" />

font_face Font face on return page

Example:
<input name="font_face" type="hidden" value="Arial,Helvetica" />

font_size

Font size on return page. The value used with this tag is based on the HTML font size scale of 1-7.

Example:
<input name="font_size" type="hidden" value="6" />

no_table Set value to "1" if you don't want tables on the return-page
env_report Use the value of HTTP_USER_AGENT and the browser that the user is in will be reported along with the information they submit in the form.

Example:
 <input type="hidden" name="env_report" value="HTTP_USER_AGENT" />

 

look

Sample forms using the formmail.asp script.

  • This form is using the default return page with many of the hidden input tags available to customize it.  Help Center Form (using default return page)
  • This form is using a custome return page using the redierect hiddent input tag.  Feedback Form (using custom return page)