HTML Forms

The main way a business or individual can collect information from a visitor to their site is by using HTML forms. Using these forms, in association with a scripting language, is an extremely efficient way to collect instantaneous feedback from customers, inquiries from potential customers, or any other type of information you wish to gather that others are willing to give you.

Remember that the less invasive your information requirements are (less detailed information you ask for), the more likely it is that the viewer will participate in sharing this information with you. Collect only the information you need to perform the specific task in order to ensure the successful implementation of the application.

See Below:


<form action="page4.htm" target="_blank" method="get">
<!-- method can be "post" too -->
<input type="text" name="FirstName" value=""> First Name<br>
<input type="password" name="password"> Password<br>
<select name="section">
	<option> - Choose Section -
	<option value="1">Section 1
	<option value="2">Section 2
</select><br>
Secure: 
<input type="radio" name="secure" value="yes"> Yes    
<input type="radio" name="secure" value="no" checked> No<br>
Remember me: <input type="checkbox" name="cookie" value="yes"><p>
Comments:<br>
<textarea name="comments" cols=35 rows=4>Comments go here</textarea><p>
<input type="reset" value="Clear Form"> <input type="submit" name="action" value="Send Data">
</form>

returns:
First Name
Password

Secure: Yes     No
Remember me:

Comments:



If you submit this form, it will send the information back to this page (set in the action attribute of the form tag). Since the method is "get", the values will be passed in the URL string (see your browser's URL path after submitting). This example, again uses the "target" attribute due to this site being built in frames. This attribute is not required.

If you used the "post" method, the values are passed without viewing them upon submitting. These are the basics of the form objects for HTML. For more advanced tutilege, please either refer to the reference books or alternate online tutorials.

End of section