CODING FORMS
Do you want a form for your affiliation page? Or do you just want to know how to make forms? Well, either way, I'm going to explain the basic form to you.Form Fields
There are different fields in a form. Here is a basic run through of the different types and their code (note: remove the * from the code):(for a simple answer)
<*input type="text" name="T1" size="20">
Text Area
(for longer comments and messages)
<*textarea rows="3" name="S1" cols="15">
Check Boxes
(for selecting multiple options)
<*input type="checkbox" name="C1" value="ON">
Radio Buttons
(limiting to one selection)
<*input type="radio" value="V1" name="R1" checked>
Submit/Reset Button
(tells the form to send or clear the fields)
<*input type="submit" value="Submit" name="B1">
<*input type="reset" value="Reset" name="B2">
The Command
The form needs an action, or where it should be sent. For example, you can change the action to mail to your email account. In this case, however, the user must have an automatic email program installed (Outlook Express, AOL, etc.) Many web hosts have a specific code you can enter in this place to email the form results to you without have to worry about the user having an email program. For example, Freewebs provides a code for this. Here is an example of the command to email the results:BUILDING A FORM
(Note: Remove the * from the last three code sets)So, now that you know what a form is made of, I'll walk you through making your first form. The first thing to think about is: what is this form for? That means what do you want in it. I'll help you make a basic feedback form. First, you'll want a text box for the user's screen name, and another one for his or her email.
Screen Name:
Email:
The code for that, including the label, is:
Now, it's time to add any other text fields you'd like. For a feedback form, you would need a text area for the comments and criticism. After adding that, your form should look like this:
Screen Name:
Email:
Comments:
Now, your code should look like this:
The final part is adding the finishing touches. That means the submit and reset buttons, and a command. Add the buttons using the code at the top of the page, and you should have this:
Screen Name:
Email:
Comments:
Your code should look like this:
Email:
Comments:
It's time for the final step: adding the command. You can do this first, too, since it goes at the beginning of the code, I'm just doing it last in this tutorial. Okay, so at the very beginning of your code, we're going to put the command. This form is going to use the email command that I showed you earlier. Add that to the beginning of the code, and it should look like this:
Now, let's close the form. You do this by using the closing tag: Add that to the very end of your code, and you have a complete form:
or




