This is an image that says University of Nevada, Las Vegas

Forms

There are two kinds of forms, the “Easy Form” and “FormMail.”  Easy Form is a very basic form-to-e-mail script that returns a thank you page to the user.  FormMail is a more sophisticated form-to-e-mail script that offers a variety of options such as required fields, URL redirection, and more.

Easy Form

Using the Easy Form script, you can have your form up and running in minutes.

  1. Create a form using Adobe Dreamweaver or similar web authoring application.
  2. In your created form, find the opening <form> tag and replace it with the following lines of code. Be sure to replace the text shown in red with your own information:<form action=”/ServerBin/E-Mail” method=”post”><input name=”recipient” value=”Insert your e-mail address here. Multiple addresses may also be used; just separate them with a comma (no space)” type=”hidden” /><input name=”subject” value=”Insert the text you wish to use for the e-mail subject line here” type=”hidden” /><input name=”return_message” value=”Insert the message you wish to have appear on the webpage that is returned to the client when he/she clicks the submit button.” type=”hidden” />
  3. Publish your form to the server.
  4. Open your web browser and test your form. You should see a thank you page after clicking the “Submit” button.

FormMail (Recommended)

FormMail is a form-to-e-mail 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.

Set up the basic form using Dreamweaver or a similar authoring application.

  1. Find the opening <form> tag and replace it with the following lines of code. Be sure to replace the text shown in red with your own information.<form method=”post” action=”http://www.unlv.edu/cgiwrap/webcgi/formmail/FormMail.pl”><input type=”hidden” name=”recipient” value=”Insert your e-mail 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 e-mail 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.</form>
  2. Publish your form to the server.
  3. Open your web browser and test your form. You should see a thank you page after clicking the “Submit” button.
  4. Customize your form using the tags described in Step 2 below.

To take advantage of FormMail features, insert the appropriate hidden input tag into your form:

recipient

The e-mail address to which the form submission should be sent. NOTE: A valid UNLV e-mail address is required. If you would like it copied to more than one recipient, separate multiple e-mail addresses with commas. For example:

<input type=”hidden” name=”recipient” value=”name1@unlv.edu,name2@unlv.edu” />

subject

The subject line for the e-mail. For example:

<input type=”hidden” name=”subject” value=”Membership Application Submission” />

redirect

Use this option to redirect the user to another URL after a successful form submission. For example:

<input type=”hidden” name=”redirect” value=”http://www.unlv.edu/yourpage.html” />

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:

<input type=”hidden” name=”return_link_url” value=”/home.html” />

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 e-mail 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:

<input type=”hidden” name=”sort” value=”order:name,e-mail,age,comments” />

If “order:” is used, you must supply the names of all of the fields that you want to be in the body of the mail message.

  print_config
This is mainly used for debugging. If set, it causes FormMail to include a dump of the specified configuration settings in the e-mail. For example:

<input type=”hidden” name=”print_config” value=”title,sort” />

The above example will include whatever values you set for “title” and “sort” (if any) in the e-mail.

required
This is a list of fields that the user must fill in before submitting the form. If they leave any of these fields blank, then they will be sent back to the form to try again. For example:

<input type=”hidden” name=”required” value=”name,comments” />

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 e-mail. This is useful for recording things like the IP address of the user in the e-mail.

[DDET Pring blank fields] print_blank_fields

Set this option to include blank fields in the e-mail. Normally, blank fields are suppressed to save space.