Add the following "hidden" fields to your form (as needed):
- <input type="hidden" name="mail-to" value="email@address">
- <input type="hidden" name="mail-from" value="email@address">
- <input type="hidden" name="mail-subject" value="Subject">
- <input type="hidden" name="mail-success" value="http://url">
- <input type="hidden" name="mail-fail" value="http://url">
- <input type="hidden" name="mail-noempty" value="1">
- <input type="hidden" name="mail-reqfield" value="Field">
- <input type="hidden" name-"mail-namefield" value="Field">
- <input type="hidden" name-"mail-nohost" value="1">
None of these fields are required if you have a traditional
lonestar.texas.net or www.texas.net account. If
you have one of our larger virtual sites or any other non-standard
Texas.Net web page, you should add the "mail-to" input field to ensure
form submissions get to you.
The "mail-empty" field set to a value of "1" will prevent submission of
the form unless certain fields are filled in. This field works in
conjunction with the "mail-reqfield" fields. If no "mail-reqfield" is
present and the "mail-noempty" field is set to "1", all fields
will be required. If one or more "mail-reqfield" tags are present,
only the particular fields represented by the "mail-reqfield" values
will be checked for data. Make sure that values in "mail-reqfield"
tags are both spelled correctly (names are case-sensitive) and present
in your form or else people will not be able to use your form.
The "mail-success" and "mail-fail" fields are URLs to web pages that
indicate a success or failure message. After the form is submitted,
the script will automatically forward the visitor to the URL specified
in the "mail-success" field (if any). A default, plain 'Thank you'
message will be shown if this field does not exist. The "mail-fail"
URL will only be sent if you have the "mail-noempty" field set to
something besides 0 and there are empty fields.
The "mail-namefield" field is an optional one that lets you specify which
field you would like to act as the name of the sender ("name"
<email@example.com>). Most forms usually ask for a name of
some sort and this allows you to attach that name to an e-mail address
that you might request. Please note, this field's value is a name of
another field (the one whose value is the name), not the name of the
The "mail-nohost" field is can optionally allow you to remove the
listing of the host sending the form from the e-mail that you receive.
Texas.Net does not recommend that you use this option as it is your
only way of tracking the source of the e-mail, but some people parse
the information in the form and the host information can through
parsing programs into fits.
In the example above, the new form will read:
<form action="http://lonestar.texas.net/cgi-bin/mailer.pl" method="post">
<input type="hidden" name="mail-to" value="firstname.lastname@example.org">
<input type="hidden" name="mail-from" value="email@example.com">
<input type="hidden" name="mail-subject" value="Someone's Name">
<input type="hidden" name="mail-success" value="http://lonestar.texas.net/~login/success.html">
<input type="hidden" name="mail-namefield" value="Name">
<input type="text" name="Name" value="Type your name here">
<input type="submit" value="Submit your name!">
The form above, since it lacks the "mail-noempty" field, will not check to
be sure "Name" is filled in. The e-mail it sends will look something like
From: Web Form <firstname.lastname@example.org>
To: "Type your name here" <email@example.com>
Subject: Someone's Name
Type your name here
You can view a sample page that makes use of
this script. Try looking at the source to see how you can implement
the features of the script in various ways. Like the CGI Counters and customer pages themselves, Texas.Net does not offer
telephone support for CGI applications such as this. If the script
isn't functioning as it should, feel free to drop a line to the
Texas.Net Helpdesk but a
response is not guaranteed.