Forms


The {form} tag has two important elements one is method the other action.
The following form tag would send the results of the form to my e-mail address.
{form method=post action="mailto:KaronAnn@aol.com"}
The data would appear as a string of words seperated by symbols,that I would then have to decipher. Many servers have form readers that send the results on to you in a readable, usable form.
Tripod has one such:
{form method=post action="/bin/mailto"}
This is a very simple one; many are a bit more complex.

elements of the input tag

{input type=text name="email" size=20}
This tag, produces this:

name can be anything you choose; when you create your form, each box should have a different name, and have something to do with what you want in that box.
Please input your e-mail address{input type=text name="email" size=20}
produces:
Please input your e-mail address
note: the size can be any size you choose. Think about the length of the answer you are expecting when choosing that number.

If you want to provide more space, you can use the textarea tag instead. {textarea name="comments" rows=5 cols=30}{/textarea}
This produces:
To identify what this area is for, you can do this:
Any questions or comments?{textarea name="comments" rows=5 cols=30}{/textarea}
to produce:
Any questions or comments?
or this:
{textarea name="comments" rows=5 cols=30}Any questions or comments?{/textarea}
to produce:


Now, to finish off this form (aside from the /form tag, which you need or the form will not work), is the submit and reset buttons.
For the submit button:
{input type=submit value="send"}
will produce:

the value can be anything you want. I've seen some very creative submit buttons.
For the reset button:
{input type=reset value="reset"}
will produce:


A Simple Form

Now to put it all together.
{form method=post action="/bin/mailto"}
Your Name{input type=text name="name" size=20}{br}
Your E-mail{input type=text name="e=mail" size=30}{br}
{textarea name="comments" rows=3 cols=30}Questions or comments?{/textarea}{br}
{input type=submit name="submit"}{br}{br}
{input type=reset name="reset"}{br}
{/form}
Will produce:
Your Name
Your E-mail




This form is active. You may use it if you wish to ask me any questions about any lessons in this tutorial.

other input tags

The check box:
{input type=checkbox name="read" value="yes" checked}
will produce:


A drop down menu:
{select name="choice"}
{option}ice cream
{option}candy
{option selected}chocolate
{option}cookies
{option}chips
{/select}
Will produce:


The radio button:
{input type=radio name="choose" value="y"}Yes
{input type=radio name="choose" value="n"}No
will produce:
Yes No