WGB Logo



Forms need a CGI script in order for them
to work. So it depends on where your page is
located as to what the code will be. Check the
FAQ section or the Help page to find out what
the beginning code will be.

To begin your form you will need the:
This tag always includes a few other tags that
tell the server how to process the form.
The action Attribute tells the browser where
to send the form. The Method tells the browser
how to send the form.
Here you can use either POST or GET.
<form action="URL" Method=post>
You need to specify where to send the results:
This is where you need to get the correct code
from your own ISP provider, or free web page
<Input type=hidden name=from your isp Value="youremail address">

To use text boxes where people will type in
<input type=TEXT Name="field name">
The field name is what you assign to the field
that is unique among the other fields in the
form. For example the first field will be the
persons first name:
First Name: <input type=TEXT Name="first">
Last Name: <input type=TEXT Name="first">
and your form will look like this:

First Name:
Last Name:

You can change the size of the box by using the
size attribute:
First Name: <input type=TEXT Name="first" size =15>
First Name:

Always good to add in the Maximum length
attribute. This makes it so they cannot add any
more words after a certain amount depending on
what you specify.
First Name: <input type=TEXT Name="first" size =15 maxlength=25>
First Name:

You can also make it a required field, meaning
the person filling out the form must enter into
that field or the form will give them an error
First Name: (required) <input type=REQUIRED:TEXT Name="first" size=15>

You can also add a value to the field, which will
have pre defined words
URL: <input type=TEXT Name="url" size =25 maxlength=50 value ="http://">

For a text area for people to add comments
use this code:
<TEXTAREA Name="comments" rows=5 cols=20>
Enter your comments here:

To use check boxes where people can select thier choices:
<Input Type=CHECKBOX name="field name">
My favorite fruit is:
Apples: Oranges:

Or use radio buttons: <Input Type=RADIO name="field name">
My favorite fruit is:
Apples: Oranges:

There are also lists that you can select from.
The size attribute is for how many item numbers
in the list you want the browser to display. You can
display them all or just display only one item.
If the size is 2 or more it will become a scroll
bar for navigating choices.
You can also use the MULTIPLE attribute in
the select tag so they can select one or more items.
<select name="field name" size=Items to display>

This is using the size of 1:

This is using the size of 4:

To add the MULTIPLE attribute:
<select name="list3" size=4 Multiple>
<OPTION> Oranges </OPTION>
<OPTION> Peaches </OPTION>

Here you can select one or more items: Hold
down the control key to select more than one item.

Now you need the submit or reset Buttons so
the form will be sent. The Value attribute can be
changed to what ever you want the button to say
<Input type=SUBMIT value="Submit">
<Input type=RESET value="reset">

Finally you need the closing form tag:

You can have the form go to another page
that says the form has been submitted or a
thank you for filling out the form. This is another
code you will need to get from your ISP or free
web page service as this differs from server to server
depending on the CGI script it uses.
it is generally something like this:
<input type="hidden" name="resulturl" value="filename.html">
This code needs to go before the ending form tag.

All help files are printable so feel free to print them.

Back to Top

  Rights for Artists Supporter

WGB Creations Button

Featured 4/9/99
Miningco Button

Designed by a
Member of the:

The HTML Writers Guild

WGB Paint Lady


This page is Copyright © WGB Creations
All rights reserved.
None of these site graphics may be duplicated,
copied, uploaded to another server or linked to.

This page was last updated 05/11/2003