Using LiveCycle Designer 8.1.1(.2188.1.406459) I've built a form that has a section that allows the user to add a single image per page using repeating subforms. There is an 'add page' and 'remove page' button. When testing the form, the 'add page' functions correctly, but the 'remove page' function always removes the last instance of the subform. I'm currently using the 'subform.removeInstance(this.parent.index)' approach which is working fine for me on other forms ... but this one has me stumped. If I modify the script for this button by changing (this.parent.index) to (this.index) or (this.parent.parent.index) I get the same results each time, which surprises me in itself that all of them would at least delete something!
I've read every post I can find on this topic and have tried every approach mentioned, but every one of the ways possible to organize subforms and buttons, etc., every scripting approach I've tried renders the same results (when they work at all).
Since I've had success with this approach in other forms, I expected this to be a simple task, but so far it's consumed way too much time and I've got an unacceptable result.
Peter, Howard (see above reply) and some of his cohorts at Avoka were kind enough to take a look at my form to see if they could determine the source of the issue. They're conclusion:
"This appears to be a bug with Reader 8.1.0 and 8.1.1 and we will raise with Adobe. The issue is with the image field inside the repeating subform.
The only workarounds that we can offer at this stage is for you to specify that users must be on Reader 8.0.0 or to remove the image field. I understand that these may not be attractive options for you.
I can also confirm that this bug does not occur with Reader 8.0.0, 7.0.9 nor 7.0.8".
Unfortunately, I can't specify an earlier version of Reader since I'm relying on certain functionality that those versions can't support.
At least knowing this has saved me from any further brow bruising as the head banging has ceased.
I had this same issue. My resolution was to use the subform name . index. SubFormName.index If you want to use this.parent.index You have to make sure for each subform above the current button you add a parent this this command. My button was 4 subforms deep so I would have to do "this.parent.parent.parent.parent.index" which does work but if I move this button then I would have to change this code.
I am having the same exact problem. I have a page with an image field that the user can dynamically add and remove. Except when the remove button is clicked, the last page is always removed. Or with other scripts, nothing happens.
I am currently using Acrobat 9 Pro and it is still a problem. Is there a new work around for this? I haven't been able to figure anything out.