Expand my Community achievements bar.

How to make a section disappear when you click a radio button

Avatar

Level 1

I am trying to figure out two questions;

  1. On the Adobe LC form my company has created, users have the option of choosing one of two radio buttons at the very start of the form. I want to know how to make a specific section underneath these radio buttons disappear, based on which button was selected.

          For example, let's say users have the option of choosing two radio buttons: YES or NO. If YES is selected, only "Section 1" should be filled out later in the form, and not "Section 2." So, my question is that if a user selects the YES radio button, how do I make "Section 2" disappear, or at least be unusable.

2. My second question also relates to radio buttons. If a user selects a radio button, but then realizes he/she no longer wants to select that option, is there a way to let the user click the radio button again, and make the selection disappear? For example, say there are again two radio buttons, YES or NO. Say the user accidentally clicks on YES, but then realizes they do not want either YES or NO to be selected. How do I give the user the option of unselecting the YES button.

Thanks, and help with these questions would be very much appreciated!!!

1 Reply

Avatar

Employee

You can set a subform to have a presence of invisible or hidden when selecting the radioButton by putting this script in the click event.

Subform1.presence="hidden"; // you can make it invisble, but the subform will remain in the layout and consume space. Hidden will remove the subform, so that the form will flow as if it weren't there.

For your second question: Is "none" a valid choice? Or does it have to be either Yes, or No. Radio buttons are mutually exclusive, so when you choose one, it will deselect the other button, and vice versa. So, perhaps the user can be given a third choice of "none". If not, your requirement seems to be suited more for a checkBox, which can behave as you indicate. select it again, and the selection is turned off.