> HI, > > I have the following radio buttons: > > <input type="radio" name="Yes"> Yes<br> > <input type="radio" name="No"> No > > Currently I can click on both the "yes" and "no" and they both get > selected. I don't want that to happen. The user should only be able > to select one. How can I do this?
Use the same name for all radio buttons in a group and provide a different value for each one: <input type="radio" name="radio1" value="Yes"> Yes<br> <input type="radio" name="radio1" value="No"> No When the form is submitted, if one of the buttons is selected, the form element named radio1 will contain the value Yes or No. By their nature, radio buttons in a group sharing the same name only allow the selection of one element. Regards, Stephen ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

