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

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

Getting subform names


Level 2


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?.



2 Replies


Level 10


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;

The ultimate experience is back.

Join us in Vegas to build skills, learn from the world's top brands, and be inspired.

Register Now