Forms

A useful and interesting feature of HTML documents is their ability to have embedded forms which the caller can complete and where the captured data is sent somewhere for processing.

The Form Opening Tag

<FORM METHOD="method" ENCTYPE="type" ACTION="url">

NOTES:

Capturing a single item of information

Enter your name: <INPUT TYPE="text" NAME="realname" VALUE="Default Name" SIZE=20>

is rendered as ...

Enter your name:

NOTES:

Capturing free-format text

Enter your comments: <TEXTAREA NAME="comments" ROWS=5 COLUMNS=60></TEXTAREA>

is rendered as ...

Enter your comments:


NOTES:

Using Check Boxes

Do you need a receipt? <INPUT TYPE="checkbox" NAME="receipt" VALUE="yes">

is rendered as ...

Do you need a receipt?


NOTES:

Using Radio Buttons

Indicate which of the following report options you require? <P> <INPUT TYPE="radio" NAME="roptions" VALUE="low"> Low <INPUT TYPE="radio" NAME="roptions" VALUE="middle"> Middle <INPUT TYPE="radio" NAME="roptions" VALUE="high"> High

is rendered as ...

Indicate which of the following report options you require?

Low Middle High


NOTES:

Using Selections

Please indicate which prospectus you require? <SELECT SIZE=4> <OPTION>Undergraduate <OPTION>Masters <OPTION>Doctorate <OPTION>Post Doctoral </SELECT>

is rendered as ...

Please indicate which prospectus you require?


NOTES:


VARIATIONS:

Hidden Variables

<INPUT TYPE="hidden" NAME="code" VALUE="123" SIZE=1>

is rendered as ...


NOTES:

Clearing and Sending The Form

Now select either <EM>Reset</EM> or <EM>Send</EM>. <P> <INPUT TYPE="reset" VALUE=" Clear "> <INPUT TYPE="submit" VALUE=" Send ">

is rendered as ...

Now select either Clear or Send:
(Note: These buttons are disabled)

The Form Closing Tag

</FORM>