Getting subform names

Avatar

Avatar
Boost 1
Level 1
selvaka
Level 1

Like

1 like

Total Posts

6 posts

Correct reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
selvaka
Level 1

Like

1 like

Total Posts

6 posts

Correct reply

0 solutions
Top badges earned
Boost 1
View profile
selvaka
Level 1

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

Avatar

Avatar
Coach
MVP
radzmar
MVP

Likes

397 likes

Total Posts

2,687 posts

Correct reply

492 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile

Avatar
Coach
MVP
radzmar
MVP

Likes

397 likes

Total Posts

2,687 posts

Correct reply

492 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile
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;

Avatar

Avatar
Boost 1
Level 1
selvaka
Level 1

Like

1 like

Total Posts

6 posts

Correct reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
selvaka
Level 1

Like

1 like

Total Posts

6 posts

Correct reply

0 solutions
Top badges earned
Boost 1
View profile
selvaka
Level 1

04-08-2017

It is working good. Thank you