|
|
||||
The Mailform has a few advantages over a standard <a href="emailto:..."> HTML hyperlink:
| Setting up a Mailform |
Once you install the Mailform script you can create as many different forms as you wish and they will all function using the one Mailform script.
| Mailform Configuration |
What follows is a listing of the required and optional HTML tags you should use to create your Mailform. We recommend using only the code you need, and tailoring it to the look and feel of your web-site.
This line specifies that your form is to be handled by the Mailform script.
The next tag that Mailform requires to function properly appears below. It specifies the email address of the person that will receive the results of the form.
Note: This address must be at the domain name under which Mailform is installed. If you'd like to send the form results to an off-server account you must first create a forwarded email address for the account and specify the recipient to be that forwarding account.
After these two tags are included you can then begin writing the fields for the information you'd like from your users. For example, if you wanted to find out someone's favorite color, you would use an input tag like this:
| Subject | There are two methods available for
setting the subject of the emails sent by a mailform:
If no subject option is included, then the subject "WWW Form Submission" will appear in the e-mail sent by the mailform. |
| Redirect | The redirect tag allows you to specify
a page the user will be redirected to after successfully completing your
form. To enable the script to do this simply include the following tag:
<input type="hidden" name="redirect" value="http://DomainName.com/return.html"> |
| Sort | The sort tag allows you to set the order
in which the results are displayed. To add this feature to your Mailform
include this tag:
<input type="hidden" name="sort" value="order:field1,field2"> |
| Required Fields | The ability to require fields is very
helpful when you must gather certain information from your users. To set
certain fields as required include the following tag:
<input type="hidden" name="required" value="field1,field2"> Keep in mind that if you set any fields required, it's a good idea to use the following tag to let your user know what information was not completed. |
| Missing Fields Redirect | The missing fields redirect allows
you to specify a page users will see after attempting to submit your form.
This tag only works in conjunction with the required fields tag and it's
main purpose is to let your users know that they forgot to provide some
required information. The code to incorporate this feature is:
<input type="hidden" name="missing_fields_redirect" value="http://DomainName.com/error.html"> |
In addition to the above optional tags you can use with Mailform, there are also two special input names you can use to add more functionality to your form.
These two special input names are:
If you use this tag, the email you recieve from the form will appear as if it's from the person that filled out the form.
If you use this tag, the email you recieve from the form will have the reply-to address of the person that filled out the form.
| Things to Remember |
Should a mailform fail to work properly, we recommend that you delete and re-install mailform from the netConsole.
| Related Items |