- Mark as New
- Follow
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
Hi,
First, you had set the max occurrence of Page1 to "1" in the Object > Binding tab. I have unchecked this. Next you had an additional script in the add page button that changed the max occurrence back to unrestricted, so I deleted this as well. Then in the delete button you had a line changing the max occurrence back to "1" again, so I deleted this as well.
For all of the repeating pages I have deselected the initial count = 1 and instead set the minimum count = 1. This will prevent the user from deleting ALL of the instances of a particular page.
Javascript syntax includes a semi colon (;) at the end of each line. I have inserted these for the add/delete buttons. Also the addInstance requires a parameter, either 'true' or '1'. Both true | 1 mean the same thing - merge the new instance with the data model.
The warnings tab had two warnings which I corrected.
NOW...
I have it working, however while Page1 repeats when add button is clicked, when the form is saved, closed and reopened the instances of Page1 increases exponentially. See this thread for details: Saving finished Form duplicates some subForms
I think that there are a couple of things going on here:
- The form is quite complex and you have used multiple objects unnecessarily. Acrobat now has to render multiple separate objects to display one interactive element of the form. This is taking up resources, for example in the US_ARMYICV checkboxes you are using four rectangles with 0.01in widths to form a box, this is very difficult to layout and maintain. You can change the visual appearance of the checkbox in the Object > Field tab under the appearance dropdown. Currently you have 'none' but you can select one of the built in appearances 'solid square' or 'sunken square' or even a custom appearance. This will allow you to delete the rectangle and make it much easier to set out your form as you will not have to try and align multiple objects on the form.
- You have also used lines instead of rectangles or even grouping elements in subforms and giving the subform a border. This is also decreasing performance during render.
- Getting to the problem of the exponentially repeating Page1, you have multiple objects with the same name. While this generally should not cause a problem, I believe that it does affect repeating objects.
- In Page1 you have three 'Table1' with the same name. Each Table1 has two HeaderRow and no BodyRow. The last Table1[2] also has an untitled Table Section with no content.
- The ECONO object was named "ECONO." with a full stop, this may cause problems because a full stop is used to separate objects when creating a reference. I have renamed all of these to "ECONO"
- You have some script on Page1 that does not make sense, for example the enter event script in T193. For the time being I have commented out some of the script that does not do anything at the moment.
I have run the form through John Brinkman's excellent debugger (http://blogs.adobe.com/formfeed/2009/05/debug_merge_and_layout.html), which highlighted some errors. In particular objects that have the same name but are bound to data. Because you have little script in Page1, I have renamed objects with the same name.
I have tried to stop Page1 repeating exponentially on re-open but have failed.
Here is the form back to you: https://acrobat.com/#d=JyvEjsjhkmmF4pcmQgf5lQ
I believe that this random repeating behaviour is buggy and would recommend that you log it as a bug with Adobe.
Good luck,
Niall
Views
Replies
Total Likes