Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

How do I refer to all instances of a repeating subform?

Avatar

Level 1

How do I refer to all instances of a repeating subform? I am trying to protect a section of my form with a click of a button. The section can be repeated. It will protect the first instance, or I can specify an instance ([1], for example), but I don't know how to say "ALL" instances. I made a really simple example.

xfa.resolveNode("Page1.row[1]").txtFirstName.access = "protected";

1 Reply

Avatar

Level 10

Hi,

Try this;

var rows = xfa.resolveNodes("Page1.row[*]");

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

{

    var r = rows.item(i);

    r.txtFirstName.access = "protected";

     // ...

}

Note the resolveNode has to be resolveNodes ... plural

Bruce