Expand my Community achievements bar.

Highlight required fields before printing

Avatar

Former Community Member

Newbie here.  Sorry if this question has been asked before.

I have a form with several "required" fields.  I have added a print button that contains the standard script.

A colleague built a form that contained a script from samples that came with the Adobe book “Adobe LiveCycle Designer” by J P Terry, where he simply copied and pasted it behind a submit button.  I have tried that with a print button but even if it finds incomplete fields, the print window still appears.  I only want that to happen when the “test” is successful.  I am inexperienced at nesting scripts and have little if no experience with JAVA. 

I have attached a PDF file of the “test” script from the book samples, and would like to know how I incorporate it into a print button script below:

xfa.host.print(1, "0",(xfa.host.numPages -1).toString(), 0, 1, 0, 0, 0);

I have a feeling that I need to set up a variable and if it equals a certain value then it will print, if not it will return the error message.

Can someone please assist.  Since my colleague resigned, we no longer have a JAVA resource.

And please be detailed in your explanation.

Thankyou

DH

0 Replies