Highlighted

Getting subform names

selvaka

03-08-2017

Hi,

I have a main form and 15 sub forms, I want to display the all the 15 sub form names in a text field using javascript.

Can any one help on this?.

Thanks

Selva

Replies

Highlighted

radzmar

MVP

03-08-2017

Hi,

as long all the subforms are located in the same level of the forms hierachy a script like the following will do the job.

var oSubforms = Form1.resolveNodes("#subform[*]"),

    cSubformNames = "";

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

cSubformNames += (oSubforms.item(i).name ? oSubforms.item(i).name : "unnamed Subform") + "\n";

}

Textfield1.rawValue = cSubformNames;