Expand my Community achievements bar.

Applications for the 2024-2025 Adobe Experience Manager Champion Program are open!

Navigating Through Groups of Radio Buttons

Avatar

Former Community Member
Hi,



I am having a problem navigating through groups of radio buttons.



I have several groups of radio buttons, I tab to the first radio button and then press the down arrow to move to the next radio button in the list.



When I press the down arrow the focus does not go to the next radio button in the list. The radio buttons appear to be selected in a random order.



I have made sure that the buttons are listed in the same order in the hierarchy. I have also arranged the buttons so they appear in alphabetic order. This doesn't seem to make any difference.



Any ideas???



Thanks in advance,



Emma
6 Replies

Avatar

Former Community Member
Hi Emma. I opened a blank form and placed a radio button on it, then used Edit>>Copy Multiple to create 3 more radio buttons (and by default create a 4 button group). When I tab into the group, the up/down arrows work as designed, tabbing in order from left to right. Without being able to look at your form, the only suggestion I can offer would be to delete the group you have now and recreate them. Are all the buttons you're trying to navigate through within the same group? To navigate between button groups the user will need to use the tab key.



If you could post the form somewhere, I'd be happy to take a look at it.



Regards,

Dave

Avatar

Former Community Member
Dave,



The radio buttons in my form are used to decide which section of the form the user needs to fill in. When a radio button is selected an instance of a subform appears.



I've done a little experiment and I've found that the radio buttons start behaving strangely when I add in the code to show a subform.



Any ideas why this would happen?



Thanks,



Emma

Avatar

Former Community Member
I don't know why radio buttons would behave strangely other than that a radio button group is not treated as a field by designer. Since the radio buttons seem to be the root of the problem, how about using check boxes instead? You can script in the same functionality as radio buttons, as far as being able to choose only one of a group. Here's a sample:



if (this.rawValue == 1) { //this stands for current checkbox

formname.subformname.fieldname.rawValue = 0 // clear checkbox

}

Avatar

Level 6
I have found that radio buttons behave badly in some versions of Acrobat/Reader when used to drive dynamic subforms. I agree with David that you should work around the problem by using check boxes that have code that makes them behave like radio buttons. To truly behave like radio buttons, you will have to add some code to prevent the user from de-selecting one of the check boxes (something that you can't do with radio buttons). So,



if (this.rawValue == 1) {

this.access = "protected";

theOtherCBox.access = "open";

theOtherCBox.rawValue = 0;

}

Avatar

Former Community Member
I was trying to use the script in this example to solve a similar problem I'm having with a radio button group that started acting strange when I added a script to it. However, the checkboxes are not acting like radio buttons. Meaning I can click multiple values and I only want 1 of the 4 options clicked. So, when I check the 2nd box I want the 1st to go away and it doesn't.



Here is my code, I've got 4 checkboxes (used to be radio buttons) and a text field at the end that appears if the last option is checked. Can someone tell me what I've done wrong?



1st checkbox:



if (this.rawValue == "Yes") {

this.access = "protected";

form1.subform3.TruthDataDIS.access = "open";

form1.subform3.TruthDataDIS.rawValue = "No";

form1.subform3.TruthDataTENA.access = "open";

form1.subform3.TruthDataTENA.rawValue = "No";

form1.subform3.TruthDataOther.access = "open";

form1.subform3.TruthDataOther.rawValue = "No";

}



2nd checkbox:



if (this.rawValue == "Yes") {

this.access = "protected";

form1.subform3.TruthDataHLA.access = "open";

form1.subform3.TruthDataHLA.rawValue = "No";

form1.subform3.TruthDataTENA.access = "open";

form1.subform3.TruthDataTENA.rawValue = "No";

form1.subform3.TruthDataOther.access = "open";

form1.subform3.TruthDataOther.rawValue = "No";

}



3rd checkbox:



if (this.rawValue == "Yes") {

this.access = "protected";

form1.subform3.TruthDataDIS.access = "open";

form1.subform3.TruthDataDIS.rawValue = "No";

form1.subform3.TruthDataHLA.access = "open";

form1.subform3.TruthDataHLA.rawValue = "No";

form1.subform3.TruthDataOther.access = "open";

form1.subform3.TruthDataOther.rawValue = "No";

}



4th checkbox:



if (this.rawValue == "Yes") {

form1.subform3.TruthDataOtherName.presence = "visible";

form1.subform3.StaticText36.presence = "visible";

this.access = "protected";

form1.subform3.TruthDataHLA.access = "open";

form1.subform3.TruthDataHLA.rawValue = "No";

form1.subform3.TruthDataDIS.access = "open";

form1.subform3.TruthDataDIS.rawValue = "No";

form1.subform3.TruthDataTENA.access = "open";

form1.subform3.TruthDataTENA.rawValue = "No";

}

else {

form1.subform3.TruthDataOtherName.presence = "invisible";

form1.subform3.StaticText36.presence = "invisible";

}



Thanks in advance for your assistance,

Debra

Avatar

Former Community Member
Hey Gang,



I just realized how Designer assigns a "tabbing order" within the radio button group.



Of course you hit the tab key to enter the radio button group, and then you can use the arrow keys to navigate through the list, but Designer by default reads from left to right within the radio button group and then down.



I have 2 col's of radio btns with about 8 rows, and I was having trouble with the order progressing back to the first column when I got to row 3 within my group, as it went to row 4 in my column 2. I realized that the phyiscal position of the radio button in column 2 for row 4 was just a smidge above the radio button in column 1. Once I made sure that the 2 radio buttons on each row began at the same y position, the order worked wonderfully.



Joe de la Forms