Feedback forms are an excellent way to collect information from your web site visitors. Much better than simply adding an email link to your page. With a form you can specify exactly what information you need provided. Here, I will discuss the basic elements of a form and how to put them all together to make a feedback form.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Form Action
The form action specifies where and how the form data will be sent. Here is what a typical form action will look like, (providing you are using cgi)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Text Box
The text box is where information such as a name, email address, url, or whatever can be inserted. The size= command determines the length of the text box. Whatever you put in the name= command will appear in your form response and identifies what you specified to be entered into this text box.
<input type="text" size="40" name="">
will create this
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Radio Buttons
These let you ask a "multiple choice" question where only one answer can be selected. This is best explained with an example.
What type of music do you prefer?
Country Pop Rock Other
The above was accomplished using the following code:
Whatever you place in the name= command will appear in your form response and identifies what this question was. Also by placing the same name in each radio button you will allow only one button to be selected. The value= will appear in the form response as the selected answer.
Here's how this would appear in the form response if the Country radio button was selected.
musictype= Country
List Box
The list box is a nice space saving element that works much like the radio buttons. Below is an example using the same question.
What type of music do you prefer?
The above example was made using the following code:
What type of music do you prefer?
<select name="musictype">
<option selected>Choose One
<option>Country
<option>Pop
<option>Rock
<option>Other
</select>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Text Area
This is a larger text box where your visitor can type comments or questions.
The above example was made using the following code:
Whatever is placed in the name= command will appear in the form response to identify the text area. The rows= sets the height of the box and the cols= sets the width.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Submit and Reset buttons.
These buttons will either send the form data or clear everything entered.
<input type="submit" value="Send">
<input type="reset" value="Reset">
The value= command specifies the text on the button.
This will all become much easier to understand once you begin putting the form elements together. Below is a simple feedback form, using the above examples:
The above form was made using the following code:
<form action="http://www.formlog.com/cgi-bin/formuk.cgi" method="POST">
Your Name<br>
<input type="text" size="40" name="name">
<br><br>
Email Address<br>
<input type="text" size="40" name="email">
<br><br>
Web Site URL<br>
<input type="text" size="40" name="url">
<br><br>
Did you enjoy my web site? <input type="radio" name="enjoysite" value="yes">Yes <input type="radio" name="enjoysite" value="no">No
<br><br>
How did you find this web site?
<select name="findsite">
<option selected>Choose One
<option>Search Engine
<option>Banner Ad
<option>Links Page
<option>Other
</select>
<br><br>
Any Comments or Questions?<br>
<textarea name="comments" rows="8" cols="40"></textarea>
<br><br>
<input type="submit" value="Send"> <input type="reset" value="Reset">
</form>
This is what you would receive in your email if someone submitted this form.
name= Rick Wise
email= visitor@home.net
url= http://www.jdstiles.com
rating= good
foundby= Search Engine
comments= This is where my comments would appear.
Following the above examples, you should now be able to construct your very own feedback form.