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.

adding an instances on top of each other.

Avatar

Former Community Member
I'm having a problem with adding instances of objects to a form.



I set up a form with a button and a text field and an e-mail button. I wrapped the button and text field in subform1a and made subform1a positioned. I wrapped subform 1a in subform1 and made subform1 flowed, western text. Then I made the page flowed, top-to-bottom.



In the click event for the button I put:



parent.instanceManager.addInstance(1);



Then I previewed the form and pressed the button. I pressed it 5 times and nothing happened. So I used the e-mail submit button to e-mail the XML of the form to myself. I opened up the e-mail and saw that subform1a had been replicated 5 times. Since I didn't see but one instance I assume that all 6 instances overlay each other. I have no idea what is causing it.



I'm using Adobe LCD 7.1. I have Adobe Acrobat Acrobat 8 professional installed and Adobe Reader 7.0 installed. The operating system is Windows XP Professional, Service Pack 2 on a Dell Optiplex GX620.
3 Replies

Avatar

Former Community Member
Hi,



You can have one more try by

1. checking the Repeat SubForm for each data item checkbox &

2. the minimum count to 1

in the Binding tab of the subform that contains the text field and button.



Regards,

Suresh

Avatar

Former Community Member
I fixed the problem.



The problem was that subforms below the instance I was adding were positioned, so the new instance went UNDERNEATH them and were hidden.



I found that when making a dynamic form, it's best to wrap all objects in positioned subforms, whether or not you plan on repeating them, and then wrap the positioned subform in a flowed subform by itself. Finally, make the page-level subform a flowed subform. A flow-direction of Western Text works best.



You might be able to do without some positioned subforms and just wrap everything in flowed subforms, western text, but LiveCycle will left-justify everything unless you put spacer objects like empty text boxes on the form to keep other objects in place.

Avatar

Former Community Member
Hi, I have the same problem with you, and I use the same environment. Just after trying all the way mentioned above, my form is still not working.



I have put it into a flowed subform, westen text direction, and the only positioned subform is under the flow subform, set repeat for each data item, min = 1.



It just does not work.



Anyone knows why?