These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Application event chain

djinges
Registered: Jun 27 2007
Posts: 55
Answered

hi, hi,

could someone tell me about the application event chain in livecycle designer (LCD) or adobe in general?

I'd like to know what is happening after user clicking (email) submit button. On LCD help you get the description for form save: ... Before saving the presave event will be call immediately..., then caculate, validate and layout::ready.

How about presubmit? Which (application) events will exec before AND after submitting? I'm very glad to hearing your support soon!

Djinges

thomp
Expert
Registered: Feb 15 2006
Posts: 4411
This is a bit complex because you don't always get the same events with all forms. It depends on the type of form (static or dynamic), the current form state, the specific elements and thier setup, and other actions that are happening on the form.

But it's easy enough to find out for your own form. Add "console.println()" statements to all of the events you want to track. Then open the form in Acrobat and display the console window. You can watch as the events happen.

Here's an article on using the Acrobat JavaScript Console.
http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/javascript_console/

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

djinges
Registered: Jun 27 2007
Posts: 55
hi Thomp,

Thanks for your quick answer!

Concreting this problem i have a dynamic form. This form will be reusable, i. e. after filling data the user submits filled form per email. Before submitting (presubmit event) all fields have to read only accessable. But after submit all read only accessabled fields have to reset to open. Could you tell me how i have to realize it?

Thanks you very much in adv!
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Use the field "access" property to set a field to read only or user entered.
For example, for a field named "text1":

text1.access = "readOnly"; // Set to Read Only
text1.access = "open"; // Set to user entered

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

djinges
Registered: Jun 27 2007
Posts: 55
hi,

i know about access property. But which event i really need is such like postsubmit, so i can make all fields accessable (i. e. obj.access = "open") once again after submitting.

I think i've concrete this problem once again: There is a dynamic form creating in Livecycle Designer. This form is created for the purpose of reusability, i. e. user gets an copy of it and can use it untill expire date.

Now we go concretely. I suppose, before submitting Adobe will save an copy of this form as attachment and all field are read only accessable before, is fine. After submitting all fields of the copy of this form have to open accessable, so user can use the dynamic form again.

I hope, its more clearness on my problem and that we understand each other!-)
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
There is no PreSubmit event. If you want to change the form before submitting then you need to submit using JavaScript instead of the built-in submit button.

Use the AcroForms "submitForm()" function like this.

event.target.submitForm(...);

You'll find the details for this funtion in the Acrobat JavaScript Reference and in this article

http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/submitting_data/

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

djinges
Registered: Jun 27 2007
Posts: 55
thanks for your help! I will try it.

Djinges