Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

Set Option Group to no value.

Avatar

Former Community Member
Hi.



Is there a way to allow users to deselect all options in an option group? Like say they have 2 radio buttons, and they select one, but then they decide they don't want either of them selected. Is there a way for them to set it so no options are selected?
4 Replies

Avatar

Former Community Member
Yes, there is.

Set all fields in the option group null:




xfa.resolveNode("form1.#subform[0].optionGroup1.#field[0]").rawValue = null;

xfa.resolveNode("form1.#subform[0].optionGroup1.#field[1]").rawValue = null;



Hmm. You may better want to use a loop...

Steve

Avatar

Former Community Member
Or just set the button list to "".. ie:



RadioButtonList.rawValue = "";



Chris

Adobe Enterprise Developer Support

Avatar

Former Community Member
That works even better! It's a slice of fried gold! Steve, Chris, thank you both.