The original radio button spec for html was very deficient as there was no way to unset a radio button once it was set. Common sense dictates that any data entry item that can be set should be able to be unset. It's true of checkboxes but not radio buttons. When that erroneous html standard is extended to other environments, this causes a huge amount of work. Every radio group has to have an additional field that has a null value just to be able to unset a radio group. We have forms with numerous radio groups. Their initial state needs to be null and they need to be able to be set back to null. We don't want any non-reversible fields. Further you cannot have a radio group with an initial state of null (with other values not allowed) that does not have a null radio button, you get FRM-30188: No initial value given, and other values are not allowed.
We need another solution. I'd like to see frm-30188 get changed regarding radio buttons. Have it be allowable that null is the initial value of a radio group
despite no radio button having a null value PLUS have another way to unset the radio group to null. Something built in. Like right click and select something or whatever. How about it?
As always, thank you very much for the suggestion - keep them coming...
An FRM-30188 at compile time is only a warning and can be ignored assuming it is accurate. Your FMX will still be created.
As for allowing null values in radio buttons, well my initial thought was "hmmm.... maybe". However, after doing some investigation and even some experimenting, this may not be doable or practical. The point of a radio button is to choose one and only one value. If null happens to be one of those possible values then you need to account for it. If you do not allow NULL then there will be no valid value that can be selected and therefore you will not be able to keyboard navigate to the radio group. Why not add a "null" value? For example, it could be presented as "None" or "N/A". Something like this:
If you want toggling behavior then a checkbox is what you need. You can code logic to only allow one checkbox to be selected at a time if necessary.