Answers Search Help
Boston University home page
Forms: Introduction
 
 
 
 
    HTML Elements
 
 
 
 
 
 
 
    PonyExpress
 
 
 
 
    Form to E-mail
 
 
 
 
    Form to Datafile
 
 
 
 
    Form to Web Page
 
 
 
 
    Also See
   
 

Radio Buttons

Radio buttons are just like checkboxes except that they do not allow more than one option to be selected. Again these are created with the <input> tag, this time with TYPE="radio". Giving multiple buttons the same NAME will again define a single form field, but selecting different buttons will deselect previously selected buttons. Again be sure to include VALUE attributes.

For example:

My affiliation is: <br>
<input type="radio" name="affiliation" value="faculty"> Faculty <br>
<input type="radio" name="affiliation" value="staff" checked> Staff <br>
<input type="radio" name="affiliation" value="student"> Student <br>
<input type="radio" name="affiliation" value="other"> Other <br>

Produces the following form. Try selecting different buttons to see how this differs from the first example.

My affiliation is:
Faculty
Staff
Student
Other

 

WebCentral Using Publishing Learning Training Consulting WebCentral
Answers Search Help
NIS  |  OIT  |  Boston University  |   January 9, 2007