Forms



Forms are primarily used for user input, for people to communicate with you. All form manipulation is done with <form>...</form> tags. There are several different input devices for forms.


Checkboxes

Checkboxes allow the user to make more than one selection from a list of choices.

Example:
What desserts do you like?

Cookies Cake Ice Cream Brownies

The code to do this is:


ListBoxes


Radio Buttons

Radio buttons are a lot like checkboxes, but you can only make one selection with a radio button.

Example:
Choose one dessert you would like tonight.

Cookies Cake Ice Cream Brownies

The code to do this is:


Reset Button

Evident by the name, the reset button erases all user input thus far from the form.

The reset button looks like this...

...and the code to do it looks like this :


Submit Button

The Submit button sends the information entered by the user in the form to the server.

It looks like the reset button

, but it says submit instead
.

The code...

In the place of value = "Submit", you could put value = "Commit to this info", value = "Sign away your soul", or anything else. Changing the value changes the words written on the button. For example, the above buttons would appear as follows (refer to the source of this page to see the exact code if you need a reminder):


Text Boxes

A text field in a form appears like this...

...and the code appears like this:
<form>
<input type=text size=20>
</form>

The size attribute does not have to be included, but, when it is, the size can be adjusted to any number.


Text Areas

TEXTAREA is similar to the text box, but you are not limited to a single line of textual input. In the opening tag (<textarea>), you need to include a name to call the text area, the number of rows in the area, and the number of columns in the area.

For example, to put a text area named "MyBox" that has 5 rows and 40 columns in a form, the code appears like this...


Return to Libby's Web Page