FormMail is a form-to-email script that offers such advanced features as required fields, URL redirection, and more. For details about using FormMail and its available options, follow the instructions below.
STEP 1: Setting up Your Form
Create a form using Dreamweaver or a similar web authoring application.
Find the opening <form> tag and replace it with the following lines of code. Be sure to fill in your own information as indicated below.
<form method="post" action="http://web.unlv.edu/cgiwrap/webcgi/formmail/FormMail.pl">
<input type="hidden" name="recipient" value="Insert your email address here. Multiple addresses may also be used; separate them with a comma (no space)." />
<input name="subject" value="Insert the text you wish to use for the email subject line here" type="hidden" />
<input name="sort" type="hidden" value="order:Insert the input names here;separate them with a comma (no space). See sort entry below for more information." />
Insert your form here.
Publish your form to the server.
Open your web browser and test your form. You should see a thank you page after clicking the "Submit" button.
Customize your form using the tags described in Step 2 below.
STEP 2: Advanced Options Using Hidden Input Tags
Several options are available with FormMail. To take advantage of these features, insert the appropriate hidden input tag(s) into your form.
recipient — The email address to which the form submission should be sent. NOTE: A valid UNLV email address is required. If you would like it copied to more than one recipient, separate multiple email addresses with commas. For example:
If you don't specify a redirect URL, FormMail will generate a thank you page telling the user that their submission was successful.
text_color — The text color for the success page.
link_color — The link color for the success page.
vlink_color — The vlink color for the success page.
alink_color — The alink color for the success page.
title — The title for the success page.
return_link_url — The target URL for a link at the end of the success page. This is normally used to provide a link from the success page back to your main page or back to the page with the form. For example:
return_link_title — The label for the return link. For example:
<input type="hidden" name="return_link_title" value="Back to my homepage" />
sort — This sets the order in which the submitted form inputs will appear in the email and on the success page. It can be the string "alphabetic" for alphabetic order or the string "order:" followed by a comma-separated list of the input names. For example:
missing_fields_redirect — Set this value to a URL, and the user will be redirected to the specified web address if any of the fields listed in "required" are left blank. Use this option if you want finer control over the error that the user sees if they miss a required field.
env_report — This is a list of the CGI environment variables that should be included in the email. This is useful for recording things like the IP address of the user in the email.
print_blank_fields — Set this option to include blank fields in the email. Normally, blank fields are suppressed to save space.