|
|
 |  |
|
- Web Support -
|
| Web Support:
Form-Mail script |
| Form-Mail
is a script that resides in the web server's global script
directory and provides for handling the input from the HTML
'forms' on your hosted website. By specifying the formmail script
as the recipient for the form fields in your form, you can have
that information e-mailed to your AP.NET e-mail account. |
Features:
- You may set
the subject line for your e-mail as desired.
- Some fields
may be indicated as 'required' and others optional.
- You can number
your field names in your form such that they are presented to
you in that order in the resulting e-mail. If you do not
number the fields, they are sent in the order encountered.
- The 'reply to'
field in the e-mail sent to you will be set to the e-mail
address of the form submitter, such that you can use your
e-mail client program's [Reply] button.
|
| Setting
up your HTML form:
First of all, you
must indicate the form-mail script as the recipient for the
information in the form. This is done in the HTML <form
...> tag
as follows:
<form
name="form name" method="POST"
action="/cgi-bin/form-mail">
This will cause
the browser to transmit the form information to the form-mail
script when a user clicks the [Submit]
button on your form.
Following the <form
...> tag
in your form, you then place several <input
type="hidden" ...>
tags which tell the form-mail script how to process your form
information. Each of these 'hidden' fields must have a specific
field name and value that is important to the form-mail script.
These 'hidden'
fields may be specified in your HTML form:
| formmailto |
This
field indicates where to mail the form results. The value is
your e-mail address, or the e-mail address of the recipient
for the form data. For example:
<input
type=hidden name=formmailto
value="youremail@ap.net"> |
| formsubject |
This
field is used as the subject line of the resulting e-mail sent
by the form-mail script. For example:
<input
type=hidden name=formsubject value="Web Form
Input"> |
| formURLtarget |
This
field specifies the next page to be shown after a form has
been successfully processed. For example:
<input
type=hidden name=formURLtarget
value="/thanks.html"> Note:
The value specified for this field must either be a full URL
(http://...) or an absolute URL beginning with a '/'. |
| formURLerror |
This
field specifies the next page to be shown after a form has
been unsuccessfully processed due to errors. For example:
<input
type=hidden name=formURLerror
value="/error.html">
Note:
The value specified for this field must either be a full URL
(http://...) or an absolute URL beginning with a '/'. |
| formrequired |
This
field lists the fields by name that are required for
successful submission of the form. For example:
<input
type=hidden name=formrequired
value="01_name,02_email"> |
| formreplyto |
This
field indicates which field (name) in your form contains the
submitter's e-mail address. For example:
<input
type=hidden name=formreplyto value="02_email"> |
|
| Defining
the fields in your form:
How you define
your form fields determines the order in which they are listed in
the resulting e-mail sent to you by the form-mail script. You
must prefix each of your field names in the
form with a two-digit number and an underscore (_) character to
specify the order of the fields.
For example, 01_Name
and 02_Email
might be used to name two of your form fields. |
| A
complete example:
Consider the
following HTML form that you wish to have processed by the form-mail
script:
The HTML code
necessary to define that form would be as follows:
<form name=myform method="POST" action="/cgi-bin/form-mail">
<input type=hidden name=formmailto
value="myself@ap.net">
<input type=hidden name=formsubject value="Web
Form Input">
<input type=hidden name=formURLtarget
value="/thanks.html">
<input type=hidden name=formURLerror
value="/error.html">
<input type=hidden name=formrequired
value="01_Name,02_Email">
<input type=hidden name=formreplyto
value="02_Email">
...
<input type=text name=01_Name size=40
value="">
...
<input type=text name=02_Email size=40
value="">
...
<input type=submit value="Submit your Name and
E-mail Address">
</form>
...
|
And the e-mail
sent by form-mail to the indicated recipient (myself@ap.net) would
look like this:
From:
www Tue Mar 19 08:01 PST 2001
Date: Tue, 19 Mar 2001 08:01:43 -0800
From: your domain name.
To: myself
Reply-To: jsmith@somewhere.com
Subject: Web Form Input
Message
generated at: Tue Mar 19 8:01:41 2001
Message generated by: your.domain.name
formmailto:
myself@ap.net
formsubject: Web Form Input
formreplyto: 02_Email
formURLtarget: /thanks.html
formURLerror: /error.html
01_Name:
John Smith
02_Email: jsmith@somewhere.com
There
were no errors detected while processing this form.
|
|
| In
Summary:
The form-mail
script can provide you with a valuable source of data from your
online forms. We've endeavored to make it as easy and simple to
use as possible. If you should encounter problems, or have any
questions, remember that our Technical Support department will be
glad to help you with your form. |
|
|
 |  |
|