Hi
I'm trying to get RemoveInstance to work properly. I want to create a button in a subform that will delete that specific subform. Right now when I hit the delete button on the bottom most subform, the first one deletes instead.
Here is the button code I've been using, from what my searches turned up it should work.
form1.MeetingMinutesForm.Project.ProjectInfo.Delete::click - (JavaScript, client)
_Project.removeInstance(this.parent.index);
xfa.form.recalculate(1);
Many thanks
Mike
Views
Replies
Total Likes
see this post: http://forums.adobe.com/message/2492059#2492059
May have your answer
Views
Replies
Total Likes
Hi Paulk07
Thanks for the suggestion, it looked promising but none of their steps worked. I downloaded the latest sample pdf from that post and tried adapting the code to mine, but no go. Tried some variations and previous suggestions, no luck.
Mike
Views
Replies
Total Likes
try this: (java script on click event)
var nNodes = OrderSection.resolveNodes("OrderItems[*]").length;
if(nNodes > 1)
OrderItems.instanceManager.removeInstance(this.parent.index);
Views
Replies
Total Likes
Hi Paul
That didn't work, nothing happened. My subform is named Project, I replaced OrderSection with project, nothing happened.
Does it matter that the button is within a group?
Mike
Views
Replies
Total Likes
Turns out the problem was all the objects within my subform were in a group including the button. I ungrouped them, set my layout to western and all was good.
Thanks for all the suggestions
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies