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

Avatar

Avatar

Curtman1979

Avatar

Curtman1979

Curtman1979

10-03-2016

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";

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar

_Bruce_Robertson

MVP

Total Posts

1.8K

Likes

268

Correct Answer

371

Avatar

_Bruce_Robertson

MVP

Total Posts

1.8K

Likes

268

Correct Answer

371
_Bruce_Robertson
MVP

11-03-2016

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