DIRECTORY
Main Menu
Affiliate Programs
Hosting
Traffic
Content
BillinG
Design
show pic archive
Articles
Tutorials
interviews
jbm newsletteRS
jbm JOBS BOARD
Contact Us
Message Board

Advertising inquiries


 
 
Tutorials - Creating FORM TEXT BOXES

The first thing you must tell the computer is that you are starting a form, and what you want done with the form data. The command to alert the computer is:

<FORM METHOD="POST" ACTION="mailto:your email address">

Notice the command did three things:

1. It told the computer a FORM was starting.
2. It stated the METHOD of dealing with the form is to POST it.
3. And the data should be posted to your e-mail address through the "mailto:" ACTION.


Remember you will need to put your e-mail address immediately after the "mailto:" without a space. This is where the results of the form will be sent.

That's nice and simple. Now that the computer knows a form has begun, it's looking for any one of a number of form styles to deal with. This tutorial will show how to make text area boxes.

The Text Box
This is a basic long box that allows for one line of text. When placed on a page, your reader will be able to write in information such as their name or their e-mail address. Here's what a text box looks like:

Go ahead. Write something in it. It works. You may have to use your mouse pointer and click on the box to activate it -- but it works. The command to place it on the page is this:

<INPUT TYPE="text" NAME="name" SIZE="30">

There are three parts to the command. Here's what they are and what they mean:

* INPUT TYPE tells the computer that a form item is going to be placed here. Remember above you placed the command to alert the computer that form items will be placed on this page? Well, here's your first form item. This form type is "text".
* NAME is the name you assign to the box. Remember that this is a form that will be sent to you through the mail. When you receive the mail, it won't be just like the page. Only the text will arrive, so you have to denote what each piece of text will be. When the mail arrives from this text box, it will say:

name=(whatever is written in the box)

That way you know this information was written in the box marked "name". Also, remember you don't have to call the box "name." Call it whatever you want. It will arrive to you with that name. If you're using the box to get the reader's name, call it "name." If you're using the box to get the reader's e-mail address, call it "e-mail." etc., etc.
* SIZE denotes how many characters long this box will be. Make it 60 or 100, if you'd like. I've just found 30 is usually a good size.

The Text Area Box
This is a larger box, like the one above, that allows your reader to write something. The difference between the Text Box (above) and the Text Area is that the Text Box only allows for one line. The Text Area, however, is much larger and will allow for as many words as you want.
Here's a Text Area Box:

Again, go ahead and write in it. It'll work. You may have to click on the box to activate it. Here's the command that made it appear:

<TEXTAREA NAME="comment" ROWS=6 COLS=40>
</TEXTAREA>

Please note that the TEXTAREA requires a </TEXTAREA> command, whereas the TEXT BOX command above did not.

Just as before... here are its parts and what they mean:

* TEXTAREA (all one word): This yells to the form command above that here will sit another form item. This one will be a text area box.
* NAME is the same as before. The information the reader puts in this box will arrive in your e-mail box denoted by whatever name you use. In this case, what is written in this box will arrive in your e-mail box with the words, "comment=".
* ROWS tells the computer how many rows of text it will accept, and...
* COLS tells the computer how many characters will be in each row. This text box will accept 6 rows of text each being 40 characters long. Go ahead and make the box bigger or smaller.

Stay tuned for more parts to the form.

 

 

 

 

 

with help from htmlgoodies

Please pass on any suggestions or comments to Shok.