Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Hidden subform issue

Avatar

Level 1

I have created a form for plant operators to use during turnover. In this form, I have hidden subforms that only display if a plant is in an abnormal status (defined by a user clicking a 'abnormal' radio button). However, when the form is saved and closed, all items that were displayed as being abnormal disappear upon re-opening. The radio buttons still show up as being selected to 'abnormal', but the hidden subfroms below no longer appear unless you click on them again. Any suggestions on how to keep these subforms showing even after closing and re-opening? Thanks!

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

you better place the script for control the visibily into the layout:ready event of the subform you want to control.

if(checkButton1.value.integer.value == 1)

     {

     this.presence = "visible";

     }

else

     {

     this.presence = "hidden";

     }

View solution in original post

3 Replies

Avatar

Correct answer by
Level 10

Hi,

you better place the script for control the visibily into the layout:ready event of the subform you want to control.

if(checkButton1.value.integer.value == 1)

     {

     this.presence = "visible";

     }

else

     {

     this.presence = "hidden";

     }

Avatar

Level 1

That is probably where I went wrong. I inserted the visibility script into the 'click' event, but forgot to put it in the layout:ready. I'll test it out now.

Avatar

Level 1

That was exactly what it was. Thanks for the helpful information.