Introduction to Forms

 

Form Tags

 

Introduction
Form Basics
Creating Multiple Forms
Form Controls Index

 

Introduction

This section contains everything you need to know to create a form.

 

Form Basics

A form is just a special section inside your regular web page. It can be anywhere in the body of the page, that is, between the "<body>" and "</body>" tags.

An html page has this structure:

<HTML>
<HEAD>
</HEAD>
<BODY>

...This is the largest section of the page, where forms go...

</BODY>
</HTML>

 

There are two html tags that show the beginning and ending of the form. Fun Form forms always begin with this form tag:

<FORM action="http://alumni.ucc.ie/cgi-bin/cs607/funform.cgi" method="POST">

and end with:

</FORM>

 

Creating Multiple Forms

You can have as many forms in a single web page as you want. When two forms are in one web page, the html looks like this:

<FORM action="http://alumni.ucc.ie/cgi-bin/cs607/funform.cgi" method="POST">

...form stuff and Fun Form hidden fields go here...

</FORM>

<FORM action="http://alumni.ucc.ie/cgi-bin/cs607/funform.cgi" method="POST">

...form stuff and Fun Form hidden fields go here...

</FORM>

 

Table of Form Controls

The purpose of form controls is to allow an easy way for your visitors to answer questions and provide you with information. Using the form tags in your html causes the visitor's browser to create the control's interface.

There are a number of controls that you can use. They are:

Control Name

Type

Use

Text Single-line text box Enter short comments
Textarea Multi-line text box Enter large amounts of text
Checkbox Box which can be checked by clicking on it To show agreement or acceptance
Radio Used to make groups of buttons Select one of several options
Menu Select Pull down menu of items Select one of several options
Multiple Select Scrolling list box of items Select one or more options
Submit Button Creates a Submit button Sends the form to Fun Form
Reset Button Creates a Reset button Restores form to its initial values

 


Text