The University of Arizona

General comments

The most common type of output used by people in the College who are using Formhandler is to have the information entered into the form sent to one or more persons as an email message.

There will be multiple HIDDEN INPUT statements you have to add to your main form, that are related to getting email back. You have to also create an email template, which you then reference.

Decide who should get the email responses

There has to be one major recepient of the email messages (the information that is posted on the web form). This can be a specific person or a mailing list (a mailing list if a group is to see the respones or an alias to forward the message to that group). You may also select to send the information as carbon copies to one or more persons or as blind carbon copies. The mailing addresses for the recipients do not have to be on the AgServer. Any email address will work.

The commands to direct Formhandler to WHOM to send the information are placed at the end of the form, before the </FORM> tag is used.

This is the syntax of the commands:

<INPUT TYPE="hidden" NAME="recipient" VALUE="ffolinda@ag.arizona.edu">
 
<INPUT TYPE="hidden" NAME="cc" VALUE="rcasler@ag.arizona.edu,sfitzner@u.arizona.edu">
 
<INPUT TYPE="hidden" NAME="bcc" VALUE="ace_it_mg@www.ace.web.org">

Although you can only have one main recipient, you may send the information to multiple people. I have used specific real addresses here and you would need to use your own email addresses. If you use a carbon copy, any recipient of the email will see all the other recipients listed. If you use a blind carbon copy, no one else getting the email will see who the recipients are, other than the main recipient.

Decide the subject line affiliated with the email message

You need to add another INPUT line on your form that tells Formhandler what subject line to use with the email message that is sent to the recipient. The syntax for this line is:

<INPUT TYPE="hidden" NAME="subject" VALUE="Volunteers for speaker program">

If you get lots of email and/or have multiple forms sending you data, you need to make this subject line specific, so you can see as you scan a list of new email which messages relate to a web form. You can also set up a filter on your Outlook or Eudora, to put responses into a mailbox automatically.

Create and reference the email template

You need to give Formhandler information about how to send the information back to you (or whomever). This layout is called the email_template and the syntax for the command is:

<INPUT TYPE="hidden" NAME="email_template" VALUE="/usr4/directory&filename-for-template">

A real example for this INPUT line on a form I work with is

<INPUT TYPE="hidden" NAME="email_template" VALUE="/usr4/general/forms/message-email.txt">

The template itself can be located in any directory area you control. It could be in the same directory as the form itself, or in another directory. The template is an ASCII file, with an extension of .txt. For my form fields, it could look like this:

Because this is an ASCII message, not an HTML document, you cannot add graphics, color, font sizes, or use tables in this "message". But you can label fields, as I have done in the above example. Also you do not have to put the fields in the email template in the same order as they were on the form. The expertise field is at the bottom of my layout.

This document is part of a set of tutorials related to putting a form on your website. The initial page is found at cals.arizona.edu/ecat/forms/olderforms.html