|
Mailform is a free CGI script which you can install onto your account
via the CGI Scripts page. The script takes the
input of a form and converts it to an e-mail. This document describes
how to configure your HTML pages for use with Mailform.
The Mailform script resides in your cgi-bin directory, reference
the script in the action tag of your HTML form as illustrated below:
<form method="post" action="/cgi-bin/mailform.pl">
This code calls the preinstalled script when the web page visitor
clicks the 'Submit' button. If you are using the form to email gateway
to process sensitive data from a secure form, please see the notes
on invoking secure transactions.
Simply add fields to your form to yield the desired functions.
Below is a list of form fields you can use and how to implement
them.
| Field |
Description |
| recipient |
This form field allows you to specify where your
form results will be mailed. Most likely you will want to configure
this option as a hidden form field with a value equal to that
of your email address. |
| subject |
The subject field allows you to specify the subject
that you wish to appear in the email that is sent to you after
the form has been filled out. |
| email |
This form field allows the user to specify their
return email address. This will be put into the 'from' field
of the message you receive. If you want to require an email
address with valid syntax, add this field name to the 'required'
field. |
| realname |
The realname form field will allow the user to
input their real name. This field is useful for identification
purposes and will also be put into the 'from' line of your message
header. |
| redirect |
If you wish to redirect the user to a different
URL, rather than having them see the default response to the
fill-out form, you can use this hidden variable to send them
to a pre-made HTML page. |
| required |
You can require certain fields in your form to
be filled in before the user can successfully submit the form.
Simply place all field names that you want to be mandatory into
this field separated by commas. If the required fields are not
filled in, the user will be notified of what they need to fill
in, and a link back to the form they just submitted will be
provided. To use a customised error page, see 'missing_fields_redirect'. |
| missing_fields_redirect |
This form field allows you to specify a URL to
which users will be redirected to if there are fields listed
in the required form field that are not filled in. This allows
you to customise the error page instead of displaying the default. |
Any fields which you include that are not listed above will be
mailed to the recipient in the body of the email.
< Back
|