Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Addinstance and change of presence

Avatar

Former Community Member
I have a subform which is invisible then when I click a button it becomes visible and within this subform is an add button.

for (var i = 1; i < 2; i++)

_ItemLine.addInstance(1);

However the new ItemLine is invisible, its there because the following subforms move down but its invisible even though the first ItemLine is visible.

I've tried lots of things but nothing works, Any ideas??

Arnie
3 Replies

Avatar

Former Community Member
Is the subform that contains the itemLine visisble? You must make sure that all container subforms are visible.

Avatar

Former Community Member
Hi Paul, itemLine is an invisible form on the page1 which is made visible when I click the Next button (which is within Header on page1.) Within the itemLine is the Add button to add an extra itemLine. The first is visible (created by the Next button)but any which are created by the addInstance are invisible which is the problem.

Avatar

Former Community Member
FIXED!! I set itemLine as visible then in initialize on page1 I set it to hidden - works a treat - thanks for your help