The Formmail CGI is a forms processor that emails the contents of a web form to a specified
recipient(s). To view the basic instructions on how to use the script in your forms, start at the Formmail Instruction Page. The following fields are optional
formmail fields that tend to be advanced in nature.
Insert Optional Fields as Needed:
The following fields are not required, but may make your form and its results more effective. Please
note that fields that are not "hidden" should have Labels so that the user will know what goes into the
field. Example: Before the email field, you might display "Please enter your email address here:"
- ENV_REPORT - The subject field will allow you to specify the subject that you wish
to appear in the e-mail that is sent to you after this form has been filled out. If you do not have this
option turned on, then the script will default to a message subject: WWW Form Submission.
To add a "Subject" field in Dreamweaver, place your cursor inside the form box and choose INSERT
> FORM OBJECTS > HIDDEN FIELD. In the Properties window set NAME to be
"subject" and VALUE to be whatever you want the subject of the email to
be. The HTML equivalent is:
<INPUT TYPE="hidden" NAME="subject" VALUE="The subject of your email goes
here">
- PRINT_CONFIG - This form field will allow the user to specify their return e-mail
address. If you want to be able to return e-mail to your user, I strongly suggest that you include this
form field and allow them to fill it in. This will be put into the From: field of the message you
receive.
To add an "Email" field in Dreamweaver, place your cursor inside the form box and choose INSERT
> FORM OBJECT > TEXTFIELD. In the Properties window set TEXTFIELD to be
"email" and verify that the type is "single line."
The HTML equivalent is: <input name="email" type="text" id="email">
- TITLE - The realname form field will allow the user to input their real name. This
field is useful for identification purposes and will also be put into the From: line of your email
message header.
To add the "realname" field in Dreamweaver, place your cursor inside the form box and choose
INSERT > FORM OBJECTS > TEXTFIELD. In the Properties window set
TEXTFIELD to be "realname" and verify that the type is "single
line."
The HTML equivalent is: <input type=text name="realname">
- RETURN_LINK_URL - After the visitor submits your form, you normally send them a web
page that thanks them for their participation and assures them that the submitted information was
received. If you wish to redirect the user to a custom page, rather than having them see the default
response page, you can use this hidden variable to send them to your "Thank-you" page.
To add a "redirect" field in Dreamweaver, place your cursor inside the form box and choose INSERT
> FORM OBJECTS > HIDDEN FIELD. In the Properties window set NAME to be
"redirect" and VALUE to be the complete URL of your custom response
page, including the "http://" at the beginning of the URL.
The HTML equivalent is:
<input type=hidden name="redirect" value="http://www.ndsu.edu/ndsu/??/??.html">
- RETURN_LINK_TITLE - You can require certain fields in your form to be filled in
before the user can successfully submit the form. Simply place all field names that you want to be
mandatory into this field, separated by commas. If the required fields are not filled in, the user will
be notified of what they need to fill in, and a link back to the form they just submitted will be
provided.
To add a "required" field in Dreamweaver, place your cursor inside the form box and choose INSERT
> FORM OBJECTS > HIDDEN FIELD. In the Properties window set NAME to be
"required" and VALUE to be the comma- separated list of fields that are
required.
The HTML equivalent is: <input type=hidden name="required" value="email,realname">
(Your list of required fields may vary from this example!
- MISSING_FIELDS_REDIRECT - This field allows you to choose the order in which you
wish for your variables to appear in the e-mail that FormMail generates. You can choose to have the field
sorted alphabetically or specify a set order in which you want the fields to appear in your mail message.
By leaving this field out, the order will usually be the same order as they appeared in the form.
To add a "sort" field in Dreamweaver, place your cursor inside the form box and choose INSERT
> FORM OBJECTS > HIDDEN FIELD. In the Properties window set NAME to be
"sort". If you want to sort by a set field order, VALUE will start out
as "order:" followed by the field names separated by commas. If you want to sort the
fields alphabetically, insert the form as described above, but set VALUE equal to
"alphabetic".
The HTML equivalent is:
To sort alphabetically: <input type=hidden name="sort" value="alphabetic">
To sort by a set field order: <input type=hidden name="sort"
value="order:name1,name2,etc...">
- BACKGROUND -
- BGCOLOR -
- TEXT_COLOR -
- LINK_COLOR -
- VLINK_COLOR -
- ALINK_COLOR -
- Note that in your particular form, you'll add other fields according to the purpose of your form for
the data fields that you need.
Insert Advanced Fields, if You Wish:
There are more defined form fields available for the FormMail program that are not normally
used.
Insert Submit and Clear Buttons:
At the bottom of your form, within the dotted form box, you will need to insert a Submit button, or your
users will not be able to submit their data to you. You may also include a Clear button that clears all the
answers from the fields, giving the user a fresh start to the form.
To add a button in Dreamweaver, place your cursor inside the form box at the end of the form and choose
INSERT > FORM OBJECTS > BUTTON. In the Properties window, choose either
"Submit form" or "Reset Form", depending on whether this is a submit
button or a clear button. You can also change the LABEL that will appear on top of the
button to something other than "submit" or "clear" if you wish. You can even specify a phrase such as
"Send my answers."
The HTML equivalent is:
<INPUT
TYPE="submit" NAME="Submit" VALUE="Submit Form">
<INPUT TYPE="reset" VALUE="Reset Form">
followed by the </form>
tag.
<blink>THAT'S ALL THERE IS TO IT!
If you need help getting this to work, email Nancy Lilleberg at nancy.lilleberg@ndsu.nodak.edu with your
questions.</blink>