Skip to main content
Lee5EB9
Participant
June 8, 2021
Question

Creating Sub Radio Buttons

  • June 8, 2021
  • 2 replies
  • 1301 views

Looking for a way to create main radio buttons with sub-radio buttons that are only available on the selected main radio buttons. As in, the sub radio buttons will be grayed-out if not under a "selected" main radio button.

Is this poissble?

This topic has been closed for replies.

2 replies

try67
Community Expert
Community Expert
June 8, 2021

You can use a script to enable/disable the "sub-group" based on the selection in the main group.

I would use the calculation event of a (hidden) text field for that.

For example, if the main group has three options, "A", "B", and "C", and you want to enable the sub-group when "B" is selected you can use the following code:

 

if (this.getField("MainGroup").valueAsString=="B") {
	this.getField("SubGroup").readonly = false;
} else {
	this.getField("SubGroup").readonly = true;
	this.getField("SubGroup").value = "Off";
}
Lee5EB9
Lee5EB9Author
Participant
June 11, 2021

Hi Try67,

thank you for your helpful response. What would be the procedure if I would want a  dropdown menu available if a specific radio button is selected?

thanks

try67
Community Expert
Community Expert
June 11, 2021

Exactly the same...

Bernd Alheit
Community Expert
Community Expert
June 8, 2021

Yes.