Forms Course

 

RADIO Field

The INPUT TYPE of RADIO will produce a small button to allow the user to select from a list of items. Only a single item can be selected to be submitted out of a single group of RADIO buttons.

Here is the line of code for RADIO INPUT:

<INPUT TYPE="radio">

Next we must add an identifying NAME to this field. Each new group of RADIO fields in the form need to have the same NAME. You can have as many groups of RADIO fields as you would like but each new group must have it's own NAME to each field in that group.

<INPUT TYPE="radio" NAME="descriptive text">

Let's take a look at what that will produce:

Next let's add a VALUE to our RADIO button. This VALUE (text) will be submitted with the form and be viewable next to the NAME.
Here is a example code with the VALUE added.

<INPUT TYPE="radio" NAME="descriptive text" VALUE="some text here">

So let's add a few RADIO INPUTS to our code:

<FORM ACTION="mailto:whoever@nowhere.org" METHOD="POST" ENCTYPE="text/plain">
<b>Who Are You ?</b>
<INPUT TYPE="text" NAME="name of sender" SIZE="15">
<p>
<b>What Sites Have You Been To ?</b>
<p>
<b>Draac.Com</b>
<INPUT TYPE="checkbox" NAME="Have they been to draac.com ?" VALUE="Yes, has been to draac.com.">
<b>Gifs 123</b>
<INPUT TYPE="checkbox" NAME="Have they been to gifs 123 ?" VALUE="Yes, has been to gifs 123.">
<b>The Board</b>
<INPUT TYPE="checkbox" NAME="Have they been to the board ?" VALUE="Yes, has been to the board.">
<p>

<b>Do You Want A Catalog ?</b>
<p>
<b>Yes</b>
<INPUT TYPE="radio" NAME="Do you want a catalog ?" VALUE="Yes">
<b>No</b>
<INPUT TYPE="radio" NAME="Do you want a catalog ?" VALUE="No">
<b>Not At This Time</b>
<INPUT TYPE="radio" NAME="Do you want a catalog ?" VALUE="Not At This Time">

<p>
<INPUT TYPE="submit" VALUE="Submit This Form">
</FORM>

Here is what our form looks like now:

Note: My example forms in this course are non-functioning and can not be submitted.

Who Are You ?

What Sites Have You Been To ?

Draac.Com Gifs 123 The Board

Do You Want A Catalog ?

Yes No Not At This Time

Try this form on a web page before you continue. Add your email address and submit the form to yourself and view the results. This will help you to understand what you have just learned. Once you have tested this form, click "next" and continue with the forms course.