![]() |
![]() |
|
|
|
|
|
Help Desk > Tutorials > Personal and Group Web Sites |
Printable Version
|
A script, FormMail, from Matt's Script Archive has been placed on webpub for you to use if you would like to have a form on your webpub website. This will allow you to create an HTML form for something such as a survey and have the results emailed to you when the user clicks the "submit" button.
When you create your HTML form, you will need to use action="/cgi-bin/FormMail.pl" in order to reference this script. The method should be POST in capital letters. Note: This script will only work for forms on webpub. You cannot reference this script from another server.
You will also need to have a recipient field. The value of that field should be the email address where you want the results sent. Most likely you will want this to be a hidden field. You will need to email the webmaster with the email address(es) used for the recipient field. Your form will not work until the webmaster has added these email addresses to the list of allowed email addresses for the FormMail program.
The recipient field is the only required field, but there are other fields specific to this script which you may want to use. There are also other features of this script which may be of interest, such as the ability to specify any field as being required, to specify the subject of the email that is sent, to redirect the user to a specified page after they click "submit", etc. These are described fully in the script's README file.
To create your HTML form you can use a web authoring package, such as Dreamweaver, which is available on public lab computers and employee computers. For information about how to create an HTML form, see this Webmonkey article. When creating your form, you'll need to use the action described above and the required field, recipient.
You may wish to view a sample form which uses this script. Note: This form will not work until it is copied to a web account on webpub. View this page in your browser and click File > Save as to save a copy of the page locally. You can then open the page in a text editor or web authoring program to customize the form for your own use and ftp the form to your webpub account.