...

View Full Version : Unselecting radio button value



florida
11-01-2004, 06:07 PM
How can I clear a radio entry if someone decides they dont want to choose either one? So if they enter a "Yes" for membership entry and then decide they dont want to enter anything in this entry then the radio button wont let them unselect the entry, it only allows them to select a "No" entry or what they have already selected "Yes" entry. Is there anyway to unselect a radio entry for a field so no selections are entered after a user has already selected one entry?? I only can have two entries as seen below so please advise.




Yes<input type="radio" name="membership" value="Yes"><br>
No<input type="radio" name="membership" value="No">

kansel
11-01-2004, 06:16 PM
A third radio button, but you'll have to make sure the descriptive text is very clear what the third option does. (Which is to select an empty value for the field.)
<label>Yes<input type="radio" name="membership" value="Yes"></label>
<label>No<input type="radio" name="membership" value="No"></label>
<label>N/A<input type="radio" name="membership" value=""></label>

Willy Duitt
11-01-2004, 07:05 PM
ondblclick="this.checked=0?1:0"

hemebond
11-01-2004, 08:54 PM
<input type="reset">Or, if "no" and no selection means the same thing, just use one checkbox for "yes".



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum