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

Alternative option for enabling and disabling subforms

Avatar

Level 1

Hello,

I have used Alternative option to enable and disable Subforms during runtime depending upon input variable.

This is working fine in first page.

But from second page onwards the Option False is not getting triggered.

The problem is happening only in Master page.

In case of Body pages , this approach is working with out problem.

Can anybody give me a clue .

Thanking you,

Regards,

  Satya

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi Satya,

You will have to loop though all the instances of that master page, so something like;

var pages = form1.Page1.all;

for (var i = 0; i < pages.length; i++) {

form1.Page1.all.item(i).TextField1.access = "readOnly"

}

Regards

Bruce

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

Hi Satya,

You will have to loop though all the instances of that master page, so something like;

var pages = form1.Page1.all;

for (var i = 0; i < pages.length; i++) {

form1.Page1.all.item(i).TextField1.access = "readOnly"

}

Regards

Bruce