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.

Making subform visible one at a time with add button


Level 1

I have a form in which I would like to make subforms visible one at a time with a button click (add button) and if the (remove button) is clicked, remove the subform. I can not do a repeating subform because these subforms will also calculate a value that will be displayed in another field (however that will be discussed on another post). 

Thru the action builder, I was able to get the 1st subform as well as other objects to become "visible" by clicking this button however, I can not make the 2nd subform visible by doing this because it will appear at the same time the 1st subform does and I do not want that. Therefore, I would like to write a script that once the 1st subform is completed, it check to see if the "add button" is clicked or the "remove button". If the add button is clicked, the next subform appears. If the remove button is clicked, the last subform is deleted. If neither is clicked, just carry on with the form. Can someone else me with the correct syntax to get this done?

This is the line I have up the exit of the 1st subform:






Problem is, when you click anywhere outside of this subform, the 2nd subform appear. I want the user to click on the "add button" in order for the 2nd subform to appear.


0 Replies