>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? > >I also have another list of radio buttons with 5 items but only want to >allow the user to select one and NOT multiples.
The trick is to have the form element use the same name, but have different values. Then on your submit page, test for the element's value: <cfif form.myRadioGroup EQ "Yes"> do this <cfelseif form.myRadioGroup EQ "No"> do that <cfelse> do nothing </cfif> Something like that. Regards, Dave. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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

