|
Using the Form-To-Mail Script
Basic Setup
When you have finished designing your form, you must
tell the form where to send its details. This is done
as shown below:
<form method=post action="http://www.net4india.com/cgi-bin/FormMail.pl">
The form now knows how to send the details, and the
name of the script which is going to process the details.
The script in itself has several configurable options.
These can be set by the user who designs the form, by
including simple statements in the HTML page. One of
the more important ones is letting the user define who
to send the results of the form to. This is done as
shown below:
<input type=hidden name="recipient"
value="the email address you want the results mailed
to">
Advanced Setup
1) If you wish to choose what the subject is:
<input type=hidden name="subject" value="your
subject">
2) If you want the user to choose the subject:
<input type=text name="subject">
This will be a text field which he/she can fill out
3) If you want the results to be emailed back to
the user also:
<input type=text name="email">
4) If you want to obtain the users realname, and
enter it into the FROM line of your message header
<input type=text name="realname">
When the email is now sent, any name that the user enters
into the textbox will appear in the FROM line of the
email message
5) If you wish the user to go to a different URL,
rather than them seeing the default response page:
<input type=hidden name="redirect" value="http://any
URL you wish">
6) To allow them to specify the URL they go to
:
<input type=text name="redirect">
7) If you want certain fields to be filled in before
the form is submitted:
<input type=hidden name="required" value="email,phone">
This will ensure that the email and phone fields are
filled in before the form is submitted
8) If you wish to view your users environment variables,
such as browser type etc:
<input type=hidden name="env_report"
value="REMOTE_HOST, HTTP_USER_AGENT ">
Other environment variables are :
REMOTE_HOST - Sends the hostname making the request
REMOTE_ADDR - Sends the IP address of the remote
host making the request
HTTP_USER_AGENT - The browser the client is using
to send the request
9) If you want to sort the order in which the variables
appear in your email (alphabetically)
<input type=hidden name="sort" value="alphabetic">
10) If you want to sort the variables in an order
defined by you:
<input type=hidden name="sort" value="order:name1,
name2, name3, etc...">
11) If you want details which appear in the header
of your email to appear in the main text also
<input type=hidden name="print_config"
value="email,subject">
The email address and the subject will now appear in
the main body of your email
12) If you want to specify the title and the header
that will appear on the return page
<input type=hidden name="title" value="Feedback
Form Results">
This will print Feedback Form Results as the title on
the return page
13) If you want to include a url link on the return
page
<input type=hidden name="return_link_url"
value="http://any url you choose">
14) The title that you wish the above url to have
<input type=hidden name="return_link_title"
value="Back to main page">
Now on the return page you will see
Back To Main Page (and this will link to the URL given
in 13)
15) If you wish to specify a background image on
the return page
<input type=hidden name="background"
value="http://domain.xxx/image.gif">
16) If you want to define a background colour on the
return page
<input type=hidden name="bgcolor" value="#ffffff">
This will give a white background
17) You can also define the text color, link color,
vlink and alink
<input type=hidden name="text_color"
value="#000000">
<input type=hidden name="link_color" value="#000000">
<input type=hidden name="vlink_color" value="#000000">
<input type=hidden name="alink_color" value="#000000">
|