HTML Forms can be used for a variety of things on your website...of course, forms are mainly used to gather information from your visitors.

Gathering information necessary to accept a payment online is a very common use of a HTML forms. HTML Forms are also used just for demographic purposes.

HTML Forms are a part of a web page that includes boxes where readers can enter information to be sent to you via e-mail.

In order to have a form that willwork on your website, you must first make sure that your webhosting service supports HTML forms. Simply e-mail the webhosts webmaster and ask if they support forms, and if there are special directions for you to follow to set it up...there will be. I recommend getting these directions first...before you go any further. Once you havethe directions for forms from your webhosts webmaster, you can write your form. Every form starts with the form tag.This tag can be located anywhere in your HTML document. The HTML form tag has two very important attributes....Method and Action. So, our form would start like this:

<form method="post" action= "the address that willprocess yourform...get thisinfo fromthe webmaster" >

Here is a complete example HTML form. This form is used on my site to collect payment information...it can be copied and used, but you will have to change the information on the form to suit your needs, and have the form delivered to you, instead of to me:

<form method=POST action="Address fromyour webmaster">
<input type="hidden" name="recipient" value="andrew@the-html-tutorial.com">
<input type="hidden" name="subject" value="Customer Check">
Enter Your E-Mail Address<br>
<input type="Text" name="email" align="LEFT" size="30" maxlength="50"> <p>Enter Your Name (as shown on your check)<br>
<input type="Text" name="realname" align="LEFT" size="30" maxlength="50">
<p>Enter Your Address<br>
<input type="Text" name="custaddress" align="LEFT" size="30" maxlength="100">
<br><input type="Text" name="custaddress2" align="LEFT" size="30" maxlength="100">
<p>Enter Your Phone Number<br>
<input type="Text" name="custphone" align="LEFT" size="30" maxlength="30">
<p>Enter Your Check Number<br>
<input type="Text" name="checknumber" align="LEFT" size="30" maxlength="10">
<p>Routing Number (9 numbers on bottom left of check between symbols)<br>
<input type="Text" name="routingnumber" align="LEFT" size="30" maxlength="9">
<p>Enter Your Bank's Name<br>
<input type="Text" name="bank" align="LEFT" size="30" maxlength="50"> <p>Enter Your Bank's Mailing Address<br>
<input type="Text" name="bankadd1" align="LEFT" size="30" maxlength="50">
<br><input type="Text" name="bankadd2" align="LEFT" size="30" maxlength="50">
<p>Your Bank's Phone Number<br>
<input type="Text" name="bankphone" align="LEFT" size="30" maxlength="12">
<p>Enter Your Account Number<br>
<input type="Text" name="accountnumber" align="LEFT" size="30" maxlength="50">
<p>I authorize J. Smith to draft a one time payment for (amount of your check)<br>
$<input type="Text" name="amount" align="LEFT" size="10" maxlength="10"></center>

<p>Please select the item(s) you are ordering: <p><br><input type="Checkbox" name="course" align="left"> Course - $30.00
<p><input type="Checkbox" name="ezinee-book" align="LEFT"> Ezine  - $10.00
<p><input type="Checkbox" name="marketingbook" align="LEFT"> Your Guide To Online Marketing - $10.00 
<input type="hidden" name="redirect" value="After form submit page"> <p><input type="Submit" name="submit" value="Submit" align= "BOTTOM"> </form>

With theabove HTML code, my form appears as this:

Enter Your E-Mail Address


Enter Your Name (as shown on your check)


Enter Your Address



Enter Your Phone Number


Enter Your Check Number


Routing Number (9 numbers on bottom left of check between symbols)


Enter Your Bank's Name


Enter Your Bank's Mailing Address



Your Bank's Phone Number


Enter Your Account Number


I authorize J. Smith to draft a one time payment for (amount of your check)
$

Please select the item(s) you are ordering:


Course - $30.00

Ezine - $10.00

Your Guide To Online Marketing - $10.00

 

When submitted, the information that would come to my e-mail would look like this. Please remember that the information here is not real...this is just an example:



Below is the result of your feedback form
It was submitted by Frank Train (ftrain@example.org) on Friday, November 27, 2003 at 16:03:13
---------------------------------------------------------------------------
custaddress: P.O. Box 1406
custaddress2: Liberty, Texas 77575
custphone: 409-334-0940
checknumber: 0000
routingnumber: 000000000
bank: Any Bank USA
bankadd1: P.O. Box 0000
bankadd2: Anywhere, USA 00000
bankphone: 000-000-0000
accountnumber: 0000000000000
amount: 0.00



As I stated earlier..you are free to copy these HTML forms for your own site, but you will have to change the "action" of the form, and various other fields, to customize the form with your information, and to gather the information you want to gather from your visitors.