Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

How to change the index (?) (position of subforms inside other subforms) using code?

Avatar

Level 3

Hi, let say I have something like this (flowed positioning):

Main subform

     subform A

     subform B

     subform C

And I want, by code to change them to:

Main subform

     subform C

     subform A

     subform B

How can I do that?

Thanks.

3 Replies

Avatar

Level 8

Unfortunately it can't be done. The alternative is having all three subforms in a repeatable subform, repeat that subform 3 times and code which ones are shown.

Kyle

Avatar

Level 10

1. What is it you want to do exactly?

Seems like you want to get the last subform, insert it at the first position and then have the subsequent subforms beneath the subform placed on first position...

2. That's it?

3. Can you have more subforms than only 3?

4. Does all the three subforms has the same fields inside them?

5. Or you just want to change the position of the flowed subforms?

Avatar

Level 3

2) yes

3) I can have N, I only have templates, that must follow an specific order (hierarchy order, not data)

4) nop

5) only the position of the entire subforms relative to each other.

Hope that helps!.

(This problem was introduced when using subform choice sets, following the data corrence and not my hierarchy layout)