Creating Email Feedback Forms for Your Site

Home >> Website Additions >> Creating Emails for Your Site

A form allows your web site visitors to enter information and send it to the email address you specify.

Probably one of the easiest forms to setup / configure is the FormMail script.  However, in order to make this work your site must be hosted with a host that allows you to upload files to your cgi bin. If you are not sure about this, contact your web hoster to find out.

Next, download the formmail script and follow the instructions provided. Once you've edited the script as necessary, upload/save it to your site's cgi bin folder on your web server.  If you do not have a folder named "cgi-bin", then you can create a new folder/directory.

Now change the permission of the file to 755 (CHMOD 755).  If you need help with uploading and changing permissions see the WSFTP tutorial.

HTML Code for Forms

Once the FormMail file is in place on your server, all you have to do is create a page with the form code to make it work.

Below you'll find a sample email form and the code for creating it (below the sample).  Just copy and paste it into your .html page.

The form has the following fields:

  • Text box
  • Check Box
  • Radio Buttons 

Here is what the form will look like and below you will find the HTML code.  You will need to change some variables (in red) to customize it to your own needs.

Your Name:


Please Place me on your mailing list:

What's Your Gender?

How Old Are You? 0-25 26-50 51 and Over


Here's the code for the form you can copy and paste.  Feel free to remove the HTML code for fields you don't need or adjust the various values to fit your liking.

Notice the red text.  This is what you need to edit to customize the form.

1) The 1st entry should be changed to the address of the FormMail script on your server
2) The 2nd entry should be the address of the page the user views after they submit the email form.  You may need to create this page.
3) The 3rd entry is the email address the form results will be sent to
4) The 4th entry is the subject of the email when the form is sent to your email address

<input type=hidden name="redirect" value="">
<input type="hidden" name="recipient" value="">
<input type="hidden" name="subject" value="Form Subject">

<p>Your Name: <input TYPE="text" NAME="Name" SIZE="40" MAXLENGTH="40">

<input TYPE="text" NAME="Email" SIZE="10" MAXLENGTH="10">

<p>Please Place me on your mailing list:
<input TYPE="checkbox" NAME="mailing-list" VALUE="Yes" checked>

<p>What's Your Gender?
<select NAME="Gender">
<option VALUE="Male">Male
<option VALUE="Female">Female

<p>How Old Are You?
<input TYPE="radio" NAME="Age" VALUE="0-25" checked>0-25
<input TYPE="radio" NAME="Age" VALUE="26-50">26-50
<input TYPE="radio" NAME="Age" VALUE="50 and over">51 and Over

<p>Comments: <br>
<textarea NAME="comments" ROWS="10" COLS="50" wrap="virtual">
You can insert default text here if you wish

<input TYPE="submit" NAME="Request" VALUE="Submit This Form">
<input TYPE="reset" NAME="Clear" VALUE="Clear Form">


If you liked this, please share. Thanks!