March 20, 2010 .
Menu

My Account
Services
 - Internet Accounts
 - Domain Hosting
 - Web Site Utilities
      - Guestbook
      - Mail Form
      - Counter
Help
 - Connecting
 - Email
 - FTP
 - Error Messages
 - Virus Info
 - SpamTrap Mail Filter
 - Problem Report
FAQs
 - CommunityNet FAQs
 - Connecting FAQs
 - Email FAQs
 - Hosting FAQs
 - Virus FAQs
About Us
 - Mission Statement
 - Policies
 - Board of Directors
 - AGMs
 - Partnerships
Hamilton Links
Bits & Bytes
Web Email
Telnet
Contact Us
Site Map
Home

Partnerships
Trillium Foundation Child Connect
myhamilton.ca
St. Leonard's Society
Hamilton FoodShare
Hamilton Public Library
Web Site Utilities > Mail Form :: 

Mail Form

Having a mail form (or submittable form) allows your visitors to email you information or comments directly from your site. There are only a couple of steps that you must take to put a mail form on your page.

Note:

You must have some knowledge of creating forms in HTML in order to have a mail form on your site.

This mail form will only work on the CommunityNet server.

  1. Create the Web page containing your form.

    This page can be designed any way you want provided that you use the following attributes in your <FORM> tag:

    <FORM ACTION="your_thankyou_page.html" METHOD="get">

    Also remember to name your form fields which will make the email you receive from this form easier to read. For example:

    <INPUT NAME ="Name" TYPE="text" SIZE="30"> would be appropriate for the field asking for the name of the person.

  2. Create your Thank You page.

    Your Thank You page is the page that does all the work. You can name the page anything you want, but remember that you type the identical name in your ACTION attribute of your <FORM> tag (1st page).

    Place the following SSI codes (exactly as shown) on your Thank You page:

    <!--#include virtual="/cgi-bin/hwcnmailform" -->

  3. Use the CHMOD option in your FTP program.

    In order to execute the SSI, we need to set the file's 'owner execution' permission flag, so that the server will know to look for these commands hidden in the HTML comments.

    In WS-FTP_LE, right click on the name of your web page in the Remote (HWCN side) directory display, and a menu will pop up with chmod (UNIX) listed. Click on that, and you will see a dialog box with permissions checkboxes. Check the box for Execute box under the heading Owner OR change the Numeric value to 744. Click on OK.

You now have a working submittable form! When a user submits the form they will get a page that says "Thank you for your submission" and then list the fields that they entered.

Additional Features

You can 'fine tune' your form by adding additional SSI command(s) ABOVE the initial SSI command of <!--#include virtual="/cgi-bin/hwcnmailform" -->.

 
The SSI command:

<!--#set var="MAILTO" value="emailaddress" -->

What it does:
By default, the script emails the results of the form to the account where the form resides. The above SSI will email the results to the email address in the value attribute.
 
The SSI command:
<!--#set var="SUBJECT" value="Your Subject Here" -->
What it does:
By default, the script enters the Subject of the email you receive as "Form Data". The above SSI will use the Subject specified in the value attribute.
 
The SSI command:
<!--#set var="THANKS" value="Your Text Here" -->
What it does:
By default, the script produces the message "Thank you for your submission" on the Thank You page. The above SSI allows you to customize your own in the value attribute.
 
The SSI command:
<!--#set var="FORMAT" value="NONAMES" -->
What it does:
The above SSI will eliminate the Field Names in the email you receive from the form
 
The SSI command:
<!--#set var="FORMAT" value="NOECHO" -->
What it does:
By default, the script 'echos' the information, entered in the form, on the Thank You page. The above SSI will eliminate that.
 
The SSI command:
<!--#set var="FORMAT" value="NOHEADER" -->
What it does:
When the script 'echos' the information, entered in the form, on the Thank You page, it prints a header saying "The Information Submitted". The above SSI will eliminate this header. Use this option when you want to compose your Thank You web page in a language other than English. Just include the translation for 'information submitted' as the last part of the 'THANKS' text (as shown above).
 
The SSI command:
<!--#set var="BLOCK" value="LINKS" -->
What it does:
Blocks submission of forms into which a web page link (URL) has been entered.
(Useful for blocking spam ads from being mailed to you via your form)