Using LiveCycle Designer ES (8.2.1...) there are two very useful pre-coded Print and Reset Buttons.
However I would like to email all the data immediately prior to Printing or Resetting.
What code do I add in between the following two lines on the Print Button to ensure that the data, and only the data, is emailed?
Code:
form1.MainContent.PrintButton1::click - (JavaScript, client)
xfa.host.print(1, "0", (xfa.host.numPages -1).toString(), 0, 0, 0, 0, 0);
I assume it is the same code that I add between the following two lines on the Reset Button:
Code:
form1.MainContent.ResetButton1::click - (JavaScript, client)
xfa.host.resetData();
I have the code for emailing the whole form, but it is only the data that I want to email, and preferably only the data that is neither calculated nor null.
I do not mind emailing the null data, but would definitely prefer not to email the calculated data.
Many thanks
David
Somthing like this
event.target.mailForm(...);
xfa.host.print(...);
xfa.host.resetData();
You can find out more about the "mailForm" function from the Acrobat JavaScript Reference.
There might be a timing problem with the reset so soon after the other operations. If this is an issue then move the reset code to the "PostPrint" event.
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