MacBoy's
Super Simple FORM TUTORIAL
for GeoCities, Part 1:
Basic Form Elements

There are FOUR basic things you'll need to make a form. That's it. FOUR. Learn these first, and you will have all you need to make a simple form any old time. There's other stuff, but we'll just do a simple form for now.

Thing One

First (and this will NOT work unless you have this exactly right) you need your opening form tag.
Don't forget to use your OWN GeoCities Member name, all in lower case, at the end of it, of course. It looks like this:

<form METHOD=POST ACTION="/cgi-bin/homestead/mail.pl?your_member_name">

READ THESE POINTERS: they're here to help you out!
A few people are writing in and asking why their forms don't work when they use this. I check their form tag and it's exact... EXCEPT they miss the first "/". Be sure it starts with "/cgi-bin/homestead..."!

And don't change "homestead" to "Hollywood" or "Athens" or anything; it's supposed to be "homestead".

If your page isn't in GeoCities: Check with your provider and make sure they support Forms, and if they do, find out what the <form> tag format should be for THEIR script. It will probably be slightly different from the above example.


Thing Two

After the opening FORM tag, you'll want some text boxes, usually at least one for the writer's name and one for their e-mail address:

Your Name:

Your E-Mail:

So, type this in:

<strong>Your Name:</strong><br>
<input name="from-name" TYPE=text SIZE="30"><p>

<strong>Your E-Mail:</strong><br>
<input name="from-email" TYPE=text SIZE="30"><p>

You can add as many of these as you want. Just change any box's name
input name="from-name"
to something like
input name="Homepage URL" or
input name="City" or
input name="Favourite song"
(and the descriptive text above it, of course) to request whatever information you're looking for.

"Size" is supposed to be how long the box is, in characters, although it comes out somewhat different on different systems.

So what can you do to make sure it's ok for everybody, using different computer systems? If it really doesn't matter, stick to a size of about 30 (which is plenty for any system) to keep all your boxes looking neat and lined up. If it's an URL, you may want to give it 50. (Anyone who needs more space will simply find the text scrolling off to the left as they enter it.) Or go to Thing Three if you are expecting a LOT of text...


Thing Three

You will probably also want a comment box, such as this:

Where did you learn about this site?

For that you put in this code:

<strong>Where did you learn about this site?</strong><br>
<textarea name="Comments: Where?" rows="5" cols="60" wrap=physical>
</textarea><p>


Thing Four

Finally, you'll need the "submit" and "reset" buttons. Note that I've changed what they say in the VALUE section:


That code looks like this:

<input TYPE="submit" VALUE="And AWAY IT GOES!!!"> <br>
<input TYPE="reset" VALUE="Press this to clear the form."><p>


Back to Thing One

Now you MUST remember to close the FORM tags:

</form>


That's it!

Hey, I told you it was simple!
Now here's a bit of info on what you just learned.
As you can see by the examples on this page (the whole page IS a form, by the way), you can also add any regular HTML code within your form, so feel free to add special info, drop in a graphic (or maybe a joke or two) in the middle of the form.
The only things you won't want to do is overlap a table and form, or throw in a link.
A form INSIDE a table is fine, as is a table INSIDE a form, just be sure you start and finish either one inside the other.
Sending a person off somewhere else with a link when they're in the middle of filling a form is just not a good idea... they may not come back to finish it.


What's next?

You can now create basic forms that look good, and (here's a bonus you might not have realized) you just picked up a couple of neat tricks that make the form work better than most forms out there. "I have?? What are they?" you might ask. We'll cover that on the next page.

So let's check out what happens when a form is processed by the GeoCities Server, and see what your neat tricks do.


Front Page | Before we start...
PART ONE: The Basic Form | PART TWO: What Happens
PART THREE: Form Buttons | PART FOUR: Lists
Survey Form | What You've Said...
F.A.Q.: Troubleshooting

Need More Help?

If you need further help with your form, visit the Counters, Forms & Imagemaps Help Forum. Please read the posts that are already up to make sure your question has not already been asked and answered. If you don't see your question covered already, just add it in, making CERTAIN that you add the URL to the problem form, if it's in your directory.
LinkExchange
LinkExchange Member Free Home Pages at GeoCities

© 1997 MacBoy