Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
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