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

can subforms move?


Not applicable
I have a two page form with three subforms whose presence is controlled by checkboxes. The user may select one or a combination of the subforms. If, for example, subform 2 & 3 are selected, I would like them to appear at the top of the page instead of in positions on the lower part of the page.
4 Replies


Not applicable
You have to use the move instance command.



where x is the subform you are moving and y is where you want it.

so if you have

subform.instanceManger.moveInstance(2,0); that would move ur 3rd instance, to the first its 0 based.

my x and ys might be backwards but just test it out


Not applicable
How did you set it up so the subforms appear based on the checkboxes? I have been trying to get mine to work all day and I am running out of ideas.



Not applicable
For the checkbox click event, have

if(this.rawValue == "1")

{this.presence = "hidden"} //you want to subform to disappear when the checkbox has a value of 1

else{ this.presence = "visible"} // and appear if the checkbox has a value of zero.

Do this for each of the checkboxes.

The outmost subform has to be flowed, top to bottom, and the form must be saved as a dynamic form.


Not applicable
Paul, I don't think you should have to move your subforms at all - if they're in a flowed container, then the ones that you want should show up at the top, and the ones you don't want shouldn't show up. You need to use the correct Presence setting (Hidden) to make sure that the hidden subforms don't take up space on the page. (if they're "invisible" they still take up space in the layout).

Hope that helps,