Hi all, i have created an invoice form (Mac Acrobat 8.1.2) using various drop down menus to auto-populate fields.
Everything within the form works as it should however, when saved and reopened all the data auto-populated from the drop-down menu disappears. Have tried solutions mentioned by others in these forums, namely adding these properties:
DataEntry = No
AllowAdditions = Yes
It partially solved the problem, in so much as when the document opens, the data flashes up for a split second before disappearing again. Further investigation has led me to believe that a "for" loop within the script may be causing it to reset itself - i removed the code and when reopened the data remains - however the auto-populating fields also stopped working.
I think i need to change the for loop so it isn't constantly running but is only called when needed, this is where i need help pleaseā¦
First, since this is all happening when the document is opened I would have to assume that the script in question, the one with the loop, is in a document level script? The code in this loop must be either directly writing over field values or causing events in fields on the form that are overwriting the field values.
Field events can be a tricky things to work with. Each event causes other events to trigger. If code is written poorly it can create uncontrolled cascades of events.
So, which events are you using? what is going on in this infamous for loop? What else is going on at Document Open?
Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]
The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/]http://www.adobe.com/devnet/acrobat/[/url]
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script