Information Technology Services Header

User Entered Email Form

The following example will send the information you enter in the fields to the Web Office email account.

USER ENTERED EMAIL FORM:

 

Your Name (required)

 

Campus Address

 

Email Address

 

Phone Number

 

 

HTML:

<HTML>
< BODY BGCOLOR="#FFFFFF">
<B>FORM:</B>
< FORM METHOD="post" ACTION="http://www.umsl.edu/servlet/FormServlet">
< INPUT TYPE="hidden" NAME="Conditional" VALUE="http://www.umsl.edu/computing/FormServlet/examples/oops.html">
< INPUT TYPE="hidden" NAME="URLreturn" VALUE="http://www.umsl.edu/computing/FormServlet/examples/thanks.html">
< INPUT TYPE="hidden" NAME="SMTPreturn" VALUE="/webstuff/htdocs/computing/FormServlet/examples/form3.tmplt">
< INPUT type="hidden" name="from_address" value="email@umsl.edu">
< INPUT TYPE="text" NAME="REQname" SIZE="30"> Your Name (required)<BR>
< INPUT TYPE="text" NAME="address" SIZE="30"> Campus Address<BR>
< INPUT TYPE="text" NAME="E_Mail" SIZE="30"> Email Address<BR>
< INPUT TYPE="text" NAME="phone" SIZE="30"> Phone Number<BR>
< INPUT TYPE="submit" VALUE="submit">
< INPUT TYPE="reset" VALUE="reset">
< /FORM>
</BODY>
< /HTML>

FILES REQUIRED:

EXPLANATION OF TAGS:

<HTML>

    Basic HTML tag.  Tells the browser that the tags are using HTML.

<BODY BGCOLOR="#FFFFFF">

    Basic HTML tag.  Starts the BODY of the page.  Formats background color to WHITE.

<FONT FACE="Verdana, Tahoma, Helvetica, Arial" SIZE="-1">

    Changes the FONT on the page to be one of these. 

<FONT COLOR="#CC0000"><B>REQUIRED VALUES FORM:</B></FONT>

    Changes the font color to UMSL red, and makes the "REQUIRED VALUES FORM:" bold.

<FORM METHOD="post" ACTION="http://www.umsl.edu/servlet/FormServlet">

    Required element for UMSL forms.  Tells form to use FormServlet to process form information.

<INPUT TYPE="hidden" NAME="Conditional" VALUE="http://www.umsl.edu/computing/FormServlet/examples/oops.html">

    This tag specifies the HTML file to return if required fields are not completed by the user filling out the form.  This tag is optional; if you leave it out, your users will have a default message returned.  The value of this tag can be any page you wish to use.  Please remember that this file is ONLY shown when a user does NOT fill in a required value on your form.

<INPUT TYPE="hidden" NAME="URLreturn" VALUE="http://www.umsl.edu/computing/FormServlet/examples/thanks.html">

    This tag specifies the HTML file to return when the form is completed successfully.  This tag is optional; if you leave it out, your users will see a default message.  The value of this tag can be any page you wish to use.

<INPUT TYPE="hidden" NAME="SMTPreturn" VALUE="http://www.umsl.edu/computing/FormServlet/examples/form3.tmplt">

    This tag points to a text file that will format the output of the form.  With this function you can edit the email file that is sent with this form.  See the link above in the FILES REQUIRED section for an example of this file.  Please note that the values within the }}{{ brackets are named exactly as they are in the HTML above.

<INPUT TYPE="hidden" NAME="from_address" VALUE="email@umsl.edu">

    Required element for UMSL forms.  This tag specifies the address the email message will be from.  This example uses this tag so that the from_address is hard coded into the HTML so that it never changes.  When the output is sent in to the email message, it will appear that the email is coming from email@umsl.edu.

<INPUT TYPE="text" NAME="REQname" SIZE="30"> Your Name (required)<BR>

    This tag create the "Your Name" blank on the form.  Please note that this field is a REQUIRED field.  A field is specified as REQUIRED when the NAME of the field starts with REQ.  This field must be filled in when the form is submitted.  If this field is blank when the form is submitted, the "Conditional" file will be returned, and the other information on the form will NOT be submitted.

<INPUT TYPE="text" NAME="address" SIZE="30"> Campus Address<BR>

    This tag creates a blank space in the form.  The other examples on this site will show examples of other "spaces" you can use on your forms.

<INPUT TYPE="text" NAME="E_Mail" SIZE="30"> Email Address<BR>

    The previous examples had the "E_Mail" variable as a hidden tag, with the Web Office email address hard coded into the tag.  By making the "E_Mail" variable a blank space on the form, the user will be able to send the form information to any email address they specify.  To test this form, put your own email address in the "Email Address" field.

<INPUT TYPE="text" NAME="phone" SIZE="30"> Phone Number<BR>

    This tag creates a blank space in the form.  The other examples on this site will show examples of other "spaces" you can use on your forms.

<INPUT TYPE="submit" VALUE="submit">

    This tag creates the SUBMIT button.  Clicking this button will send the form values to FormServlet, and return the message "Form Successfully Submitted" to the user.  Whatever text is used as the VALUE will be what appears on the button.

<INPUT TYPE="reset" VALUE="reset">

    This tag creates the RESET button.  Clicking this button will clear all answers from the form.  Whatever text is used as the VALUE will be what appears on the button.

</FORM>

    This tag tells the browser that the form is done, and needs to be placed at the END of your form.  No form variables AFTER this tag will work.

</BODY>

    Basic HTML tag.  This tag tells the browser that the BODY section of the page is closed.

</HTML>

    Basic HTML tag.  Tells the browser that the HTML is finished.