I am a newbie working with LiveCycle Designer 7.0 to create my very first form. I am having a little difficulty getting some buttons to work the way I need them to work. I have a button that recreates the text fields from the subform of another subform (this works properly). The second button recreates the main subform (including its subform), and this works properly. However, when I use the second button and the main subform is recreated, the first button still only adds fields to the original subform of the subform. How do I get it to work with each new subform created by the second button? I have tried several different methods but haven't had any luck.
I'm having a hard time understanding exactly what these buttons do. Are you using the Instance Manager to create new instances of the subform (from the second button)? How exactly are you recreating the text fields ?
It sounds like you're simply wanting to generate a new instance of a subform which contains text fields. You can achieve this simply by placing the subform which will have many instances (the Dynamic Subform) in a flowed container and then setting the Dynamic Subform's Initial Count property on the Object palette's Binding tab to a desired number of initial instances. Then you would have a single button which, when clicked, would invoke the Dynamic Subform's Instance Manager to add a new instance of the subform which would, at the same time, replicate all the fields within the subform into the new instance.
I've attached a sample for which has a button that, when clicked, generates a new instance of a subform containing a few fields. Check it out and see if this is similar to what you're looking for.
What I have is a subform of a subform...subform 1 and subform 1a. Button 1 uses addInstance to allow the user to add as many fields as needed in subform 1a. Initially this button works. Button two is used to generate a new instance of subform 1 (which includes subform 1a), and this works as well. However, once button two is used and the new instance appears on the form, button one still reacts by adding an instance of subform 1a in the original subform...not on the newly generated instance. The rest of the form works well, but of course this is the one part that isn't cooperating.