Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

how to fix addinstance() regrouping information after saving the form?


Level 1

I have a table in a form that includes First Name, Last Name, Address, etc. Under this table I have a button to add an instance of this form under it, when I am working with the form the addInstance() code adds it under and everything looks fine however, when I save the form, close it and open it back up all of the First Name fields are grouped together, all of the Last Name fields are grouped together, etc. and the only way to get the formation back is to use the delete button I've created which deletes one the of the entries while simultaneously regrouping the information in the correct order. Is there a way to get the information to stay in the correct grouping while keeping the form dynamic?

This is what I have currently when clicking the New Instance button

// this._consumer.addInstance(1);

2 Replies


Level 10


What is the binding expression you have for the First Name, Last Name, Address fields, and the consumer subform.

Only the consumer subform should have the "[*]" part, the should be relative to the consumer subform.


Level 7

Can you send the file? mousland@gmail.com. I would like to see what the problem is. This should not be happening