<class home>  <forms>   <back   next>

Radio Buttons

Radio buttons are supposed to look like buttons you push in. You make a selection from them.


ex.

pick a color:
red:    blue:    yellow:

do you like red:
yes:
no:


To make a radio button: Dreamweaver

1. Put your cursor where you want it in the document window.

2. Select Insert>form object>Radio Button from the main menu.
Or click on the form button in the object panel: form section:

3. In the Properties panel:
-give it a name, now the name should be the same for all radio buttons in a set.
-give every radio button item a unique value in the "Checked Value" field.
-choose an initial state of checked or unchecked (checked will have it selected initially)



In HTML

Typing it in.

ex.

pick a color:
red:    blue:    yellow:

do you like red:
yes:
no:

To get the example above, put this into the <body> section of your html:

<form name="form2" method="post" action="" enctype="multipart/form-data">
<p>pick a color: <br />
red:
<input type="radio" name="color" value="red">
&nbsp;&nbsp;&nbsp;blue:
<input type="radio" name="color" value="blue">
&nbsp;&nbsp;&nbsp;yellow:
<input type="radio" name="color" value="yellow">
</p>
<p>do you like red:<br>
yes:
<input type="radio" name="red" value="yes">
<br />
no:
<input type="radio" name="red" value="no">
</p>
</form>