'Un-select' a radiobutton? [closed]

I have always wondered if there is any way or trick to un-select a radio button once you have selected one.

I'm asking this as a generic question, not regarding a specific program. it could be a desktop program or a webpage.

Once you click on a radio button it seems like there is no way to unselect it, so if you wanted to leave the field blank, you can't once you have already made a selection. It kind of 'forces' you to select something.

UPDATE: Im sorry, I was referring to radio buttons and not checkboxes, I confused the terms.


Solution 1:

You're thinking of radio buttons:

a group of round checkboxes where only one can be selected at a time

…and any interface that leaves you wanting to uncheck a group of radio buttons is Doing it Wrong™. Radio buttons should (best) start out with a default option checked, not accept input if the user doesn't make a choice, or (worst) provide a button to uncheck everything.

If complaining to the software/website designer isn't an option, here's a bookmarklet which unchecks every radio button on a page:

javascript:(function(){var%20inputs%20=%20document.getElementsByTagName(%27input%27);for(var%20i%20=%20inputs.length-1;i>=0;i--){if(inputs[i].getAttribute(%27type%27)===%27radio%27)inputs[i].checked=false}})()

...and here's a version that works in the console:

(function(){var inputs = document.getElementsByTagName('input');for(var i = inputs.length-1;i>=0;i--){if(inputs[i].getAttribute('type')==='radio')inputs[i].checked=false}})()

If you're dealing with desktop software, the only option is usually to exit out of the problematic screen and go back in.

Solution 2:

Add a radio button called None

Solution 3:

That is generally a problem with Radio Buttons, the circular type of selection widgets that allow for only one of a group to be selected. Checkboxes are designed to have them either checked or unchecked. I doubt that checkboxes in general don't allow deselection. It might be good to give examples of your issue.

Note that if you have a problem 'unselecting' the last selected item in a set, it is always good to attempt clicking on your selection while pressing CTRL at the same time.