Ranson's Scripts MailForm© Help

MailForm will send mail to you from any form you design. The form may be designed any way you like, with any combination of field types. There are a few tags (see below) that must be present in your form for the program to send mail to you. See the example form.

Input tags you may use:

Installation

  1. Place the mailform.pl in your cgi-bin or any folder where you can run CGI Programs.
    For Unix systems, chmod mailform.pl to 755.
  2. Change the <FORM ACTION=" http://www.yourserver.com/mailform.pl "> tag on your form, to indicate the web address for the mailform.pl.
  3. Design your form to fit your site and specific form needs.

Designing your Form

In your HTML Form there are tags that must be present in the form for the program to send mail to you.
Note: The fields that start with XX- CAN NOT be changed and must be exactly as shown below.

Tag Names that CAN NOT be changed

You do not have to use the tags for users Name and users E-Mail Address . . . but
If the tags are used on your form, they MUST be exactly as shown below. You may however, change the size=40.

Hidden tags that must be present

The mail Subject
<input type="Hidden" name="XX-subject" value="My Mail Subject">
Who to send the E-Mail to
<input type="Hidden" name="XX-send-to-email" value="you@your-server.com">
To Sort or not to Sort
<input type="Hidden" name="XX-sort" value="yes"> or value="no"

Optional Hidden tags

Setting Up Required Fields
<input type="Hidden" name="REQUIRED" value="XX-name,XX-email,Comments">

To make a form field Required to be filled in by the user use the tag above in your form. To define which fields you want to require, put the name of the field
( XX-name for the users Name Field )
in the Value="XX-name" portion of the REQUIRED tag. To Require more than one field, place a comma (,) between the fields you want to require.
Example - value="XX-name,XX-email,Comments" will require the users Name, users E-Mail, and Comments.
Important: Use only one REQUIRED tag in your form.

Redirection the user to ?
<input type="Hidden" name="XX-redirect-to-url" value="http://www.rlaj.com">

Using this tag in the form, you can "redirect" the user to another page after they have filled in your form. If you do not use this tag, the user will see a "Thank You" screen after the form is submitted.



Example Form HTML Code

Send your questions or comments

* Your Name

* E-Mail Address

* Message
*

 



Example Form Code

<html>
<head>
<title>Mail Form</title>
</head>
<BODY BGCOLOR="#FFFFF1">
<center>
<h2>Send your questions or comments</h2>
</center>
<form method="POST" action="http://www.your-server.com/cgi-bin/mailform.pl">
<input type="Hidden" name="XX-subject" value="Ranson's Mail Subject">
<input type="Hidden" name="XX-send-to-email" value="you@your-server.com">
<input type="Hidden" name="XX-redirect-to-url" value="http://www.rlaj.com">
<input type="Hidden" name="REQUIRED" value="XX-name,XX-email,Comments">
* Your Name
<BR>
<input type=text name=XX-name size=40>
<p>
* E-Mail Address
<BR>
<input type=text name=XX-email size=40>
<p>
* Message
<BR>
<textarea name="Comments" WRAP=physical COLS=50 ROWS=10></textarea>
*
<input type="submit" value=" Send Mail ">
</form>
<HR Width=90%>
<HR Width=50%>
<HR Width=10%>
</body>
</html>