Maui Net Member Services - Personal Web Pages: creating your own form
Personal Web Pages: Email Forms *
* (Please note: This page is provided as a service to our members.
Our staff does not provide instruction in HTML.)
All Maui Net accounts can be used to run simple cgi email forms in which a visitor fills in information, presses a "submit" button, and the contents are transmitted by email. This tutorial will show you the correct way to format your form so that you can make use of this feature.
For instructions on how to create a fill-in form, visit NCSA Fill Out Forms Tutorial, or check one of the other web development sites listed on our Web Page Help site.
Each field of your form will need to be named. Take a look at the source of this document to see how to do this. If you would like to make a field required, name it "required-name." For example, if you want to require the sender to fill in the email field, name that field "required-email."
You will also need to create a formatting document to match your form. The formatting document is a text file that tells the system how to layout your email and where to send it. Click here for an example.
There are four important things to remember about the formatting document.
- All form fields must be enclosed in square brackets. Example: [required-email]
- The names of the form's fields must be exactly the same as in the form. If the form uses "required-email", but the formatting document uses simply "email", your form won't work properly
- The formatting document must be uploaded to the server as a text/ascii file. If it's uploaded as a binary file, your form will not work.
- the first three lines of the formatting document must be:
You may hardcode any of these fields instead of using form variables (Example: "To: firstname.lastname@example.org"). However there cannot be any spaces above or between these three lines, or the form will not work.
Now on to the most critical line in the html code for your fill-in form. This is the "FORM ACTION" statement. It should look like this:
<FORM METHOD="POST" ACTION="http://www.maui.net/cgi-bin/cgiemail/~yourlogin/yourdoc.txt">
Put your login name where it says "yourlogin" and your formatting file
where it says "yourdoc.txt". Customers with domain names should use their name in the url (below)
<FORM METHOD="POST" ACTION="http://www.mydomain.com/cgi-bin/cgiemail/yourdoc.txt">