Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

show/hide subform based on radiobutton on masterpage


Level 3

I have a set of radiobuttons on my master page.

If radiobutton 1 is selected, then subform 4 must be hidden (excluded)

and when radiobutton 2 is selected, subform 4 must be visible.

I can't get it to work.

I tried put the script on the calculation of subform 4

if (xfa.resolveNode("formulier1.#pageSet.Pagina1.AanbestedingBetreft").rawValue == 1)

    this.presence = "hidden";


    this.presence = "visible";

But nothing happens

then i tried to make a calculation on the radiobutton.

But then suform 4 is invisible, but not excluded (i get an empty page)

What is the best way to do this??

3 Replies


Level 5


I believe your code is perfect.

Check in the binding tab of the radio buttons Specify Item Values check box is checked and what are the binding values to the two radio buttons?




Level 3

Still can't get it to work

drives me insane

is soon as i put the name of the radiobutton in my script, the radiobutton cannot be clicked anymore.

Can anyone help me please?

I've got 3 textfields and a radiobutton set on my masterpage

based on the radiobutton value, some subforms on the form must be hidden or visible.

where do i put my script and how to script it.


Level 5

I hope when you click on the button show/ hide thing is happening but the button style is not visible.

Below is the example :


I faced similar issue when i was working on my form.I didnt get any reply from experts ..