Site hosted by Angelfire.com: Build your free website today!
Receiving & Formatting Form Results from E-mail

Using e-mail to receive form results is convenient and easy. All it requires is to use the mailto: command in the ACTION= attribute within the FORM tag. The only problem is that the information is strung together and has % and other characters in it which makes it difficult to read. There is a very simple fix for this using the ENCTYPE attribute.

Example:

my quiz form has the following in the <FORM> tag:

<FORM ACTION="mailto:tschult@pop3.utoledo.edu" ENCTYPE="text/plain"

METHOD=POST>

 

* To get the results sent via e-mail, make sure you use these tags:

ACTION="mailto:yourfullemailaddress"; METHOD=POST

Example: <FORM ACTION="mailto:tschult@pop3.utoledo.edu" ENCTYPE="text/plain" METHOD=POST>

 

* To get the results formatted in a readable format, make sure you use these tags:

ENCTYPE="text/plain"

The formatting of the e-mail form results is accomplished by ENCTYPE. It stands for encryption type. The "text/plain" says to make it readable. Beyond that, I don't know anything except it works and avoids the need for using a cgi script to format a form.

Example: <FORM ACTION="mailto:tschult@pop3.utoledo.edu" ENCTYPE="text/plain" METHOD=POST>

 

* What you see in your e-mail:

Your resulting e-mail will have each field placed on a separate line and list first the name you gave the field, then an = sign, then the response given by whoever filled out the form:

name of field = user response

Example:

My fields were named and were the following types:

FromName (text box)

FromEMail (text box)

Course (pop-up selection box)

ID# (text box)

Subject (pop-up selection box)

Q1-Colorscheme (radio button)

Q2-Focalpoint (pop-up selection box)

Q3-Emphasis (text box with partial answer provided)

Q4a-formality (checkbox)

Q4b-impact (checkbox)

Q4c-balance (checkbox)

The e-mail sent to me is shown below. Notice that each field is shown on aseparate line, making it easy to tell the information. The process also keeps case sensitivity--my response to question 3 (THIS IS A TEST ANSWER) was typed in caps on my form text box. Question 1 was a radio button; question 2 was a pop-up text box, question 3 was a fill in text box, question 4a, 4b, and 4c used checkboxes. Notice that there was more than one response provided as an answer for question 4c--each of the checked boxes was properly recorded.

Date: Wed, 28 Apr 1999 21:00:36 -0400

From: tami schultz <tschult@pop3.utoledo.edu>

Subject: Form posted from Mozilla

To: tschult@pop3.utoledo.edu

MIME-version: 1.0

Original-recipient: rfc822;tschult@pop3.utoledo.edu

 

FromName=Tami L. Schultz

FromEMail=tschult@pop3.utoledo.edu

Course=ID 101-MWF

>ID#=123-45-6789

Subject=quiz#3-APPLICATION

Q1-Colorscheme=analogous

Q2-Focalpoint=C-DEERHEADS

Q3-Emphasis=Emphasis is created in the picture by using the elements of ....

 

THIS IS A TEST ANSWER.

Q4a-formality=informal

Q4b-impact=serene

Q4c-balance=assymetrical

Q4c-balance=radial