Checkbox without mulitple values

I’ve been trying to find a way to get a checkbox t o behave more like a radio-button.

Given 2 available keywords, set up a checkbox so when one selection is made the other (if already selected) is deselected. This should allow to check only one box at a time, or none at all.

This is a Notes-client app, but jscript is welcomed. :slight_smile:

Subject: Checkbox without mulitple values

IMHO…

Don’t confuse your users. Checkboxes are always mulit-select. Radio buttons are always single values.

Subject: Checkbox without mulitple values

The “Input Translation” field property is your friend here. For instance, let’s say you want a field on a configuration form to set whether debugging is enabled for your application. You could use a radio button with true and false values or you could use a checkbox that says “Enable Debugging” and put this in the input translation:

@If(@ThisValue = “”; “False”; “True”)

Subject: Checkbox without mulitple values

How about having 2 checkboxes and a formula that says if one is checked the other should be cleared. Haven’t tried it but it sounds easy.

Subject: RE: Checkbox without mulitple values

Michelle, at that point you’re just emulating radio button functionality but with the added burden of now it’s your code doing it instead of the tried and true built in code for radio buttons.

Also, you now have a big no-no: you are now messing with the user’s perception of How Checkboxes Work™. It is one thing, and entirely within the realm of what a user might expect, to have a checked box have one value (true) and an unchecked box have another (false). To have a checked box mean “ok, this is true but then also that other thing over there is going to be forced to false” violates the user expectation for checkbox behavior and this is a Bad Thing™. :slight_smile:

Of course now I look at the original post and it seems as if this “bad thing” is exactly what is sought. If so, I have to echo Graham’s sentiment. Use radio buttons. Making a checkbox actually behave fully like a radio button stinks.

Subject: RE: Checkbox without mulitple values

Oh sure I agree that having a checkbox that only allows 1 value to be checked is a bad idea, but he wasn’t asking my opinion he was just asking for a solution. :slight_smile:

I know the biggest problem with radio buttons and users is that once they select something they can not unselect it to leave the radio button empty. My solution to that has been to include a N/A option or a None option so if the user accidently selects something and then needs to clear the selection they have the option to select None.

Subject: RE: Checkbox without mulitple values

I disagree. The biggest issue with radio buttons is they are used when the user is not presented with an either or situation. Or, similarly, the developer fails to take all scenarios into account. If “none” is a valid choice then absolutely it should be one of the radio buttons. It just makes sense. There should never be a situation where none of the radio buttons is selected though. That’s almost as evil as programming checkboxen to behave like radio buttons. :wink: