Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Can radio buttons hide other radio buttons?

jessicas8725420
Level 1
Level 1

Hi, I'm building an application using Adobe Livecycle and I'm a bit new to it. If you are using radio buttons for 'yes' or 'no' questions and, whichever one you select affects the next questions to be visible or hidden, but the next questions contains radio buttons. How do you get the second set of radio buttons to become hidden? Any help with this would be greatly appreciated!

1 Accepted Solution
lateniteNC
Correct answer by
Level 4
Level 4

If  you are looking for script, this is relatively easy.

Create a radio button group in the workspace (I am assuming in the first set a "Yes" and "No" answer).

Create the second radio group with the other radio buttons you wish to be visible depending upon the selection made by the user in the first radio button group. From the Object palette, set Presence property for this second set to "hidden."

In the click event of the first radio group, add this code:

if (this.rawValue ==1){

 
form1.Page1.SecondRB_Set.presence = "visible";

}

    else{

        form1.Page1.SecondRB_Set.presence = "hidden";

}

In this example, I set the values for the first button (the "Yes" button to 1; the "No" button to 2). Thus, if "Yes" is clicked, the second radio button group will appear on your form.

A sample example is here:

https://www.dropbox.com/sh/nbcotxs1oddlxi8/AABva-CnzSniy20ruJQtb-v1a?dl=0

View solution in original post

4 Replies
alassir
Level 2
Level 2

Hi jessicas87254208 ,

you need to script this. In LiveCycle Designer, (since ES4, I think)  you have a so called "Action Wizard", which can create such a script - you just need to select the actions and Settings you want to - simply by selecting these with the mouse. You don't need skills in programming (though they help).

Hope this helps you.

Regards

Dietmar

lateniteNC
Correct answer by
Level 4
Level 4

If  you are looking for script, this is relatively easy.

Create a radio button group in the workspace (I am assuming in the first set a "Yes" and "No" answer).

Create the second radio group with the other radio buttons you wish to be visible depending upon the selection made by the user in the first radio button group. From the Object palette, set Presence property for this second set to "hidden."

In the click event of the first radio group, add this code:

if (this.rawValue ==1){

 
form1.Page1.SecondRB_Set.presence = "visible";

}

    else{

        form1.Page1.SecondRB_Set.presence = "hidden";

}

In this example, I set the values for the first button (the "Yes" button to 1; the "No" button to 2). Thus, if "Yes" is clicked, the second radio button group will appear on your form.

A sample example is here:

https://www.dropbox.com/sh/nbcotxs1oddlxi8/AABva-CnzSniy20ruJQtb-v1a?dl=0

View solution in original post

jessicas8725420
Level 1
Level 1

Thank you so much! I had tried this approach but instead of coding the buttons as a group, I had tried coding them one by one. No wonder it didn't work.