I have a form which has 3 radio buttons, each providing a fieldset.
o Choice 1
Fieldset of options v
o Choice 2
Fieldset of options v
o Choice 3
Fieldset of options v
In order to achieve this, the three radios are each individual radio buttons, and the fieldset for each is enabled when the radio is checked.
The problem, of course, is that once checked, checking one of the other radios doesn't uncheck the original, because they are different fields. I could use #states to simulate radio behavior, clearing one when another is selected, but I don't believe that will work. If I set Option2 to clear if Option1 is checked: Checking Option2, then checking Option1 will clear Option2, great Trying to check Option2 again will leave it unchecked, because the test of whether Option1 is checked will be true
I tried this setting for two of them:
'#states' => array(
'unchecked' => array(
':input[name="*theOtherOption*"]' => array('checked' => TRUE),
),
What happens is the behavior works for the first click of each radio button, clicking 1 turns off 2, clicking 2 turns off 1, and then it stops working and I end up with both clicked.