-
1. Re: blocking printing the form until mandatory fileds ar filled with data
Karl Heinz Kremer Mar 15, 2017 7:59 AM (in response to polyphilus)No, but you can make the print unusable by adding e.g. a page filling form field that adds "NOT COMPLETE" across the page. You would create this field and then hide it. In the "Document Will Print" action, you would show it, and in the "Document Did Print" action, you would hide it again.
-
2. Re: blocking printing the form until mandatory fileds ar filled with data
try67 Mar 15, 2017 8:41 AM (in response to polyphilus)It's possible to some extent... You can't prevent the file from being printed entirely, but you can force it to print without any of the data in the fields or with a large error message.
I've developed a script that allows you to do that. You can find it here: Custom-made Adobe Scripts: Acrobat -- Validate Required Fields Before Printing or Saving
-
3. Re: blocking printing the form until mandatory fileds ar filled with data
polyphilus Mar 15, 2017 8:46 AM (in response to Karl Heinz Kremer)Thank you for you quick replay
The mandatory fields are "internalAddress" and "refenceNumber"
The filed "intrnalAddress" contains the initial text "Interne Versandadress"which the use has to replace by a current address.
The field "referenceNumber" is initially empty
The field "warning" contains the text "NOT COMPLETE" across the pabe.
I added the follwing script to the"Document Will Print" action
var ia = this.getField("internalAddress").value
var rn = this.getField("referenceNumber").value
if (ia == "Interne Versandadresse" || rn == "")
this.getField("warning").display = display.visible;
else this.getField("warning").display = display.hidden;
As I can see it works.
Why I should hide the warning field in the "Document Did Print" action?
-
4. Re: blocking printing the form until mandatory fileds ar filled with data
Karl Heinz Kremer Mar 15, 2017 8:49 AM (in response to polyphilus)Depending on how big your warning field is, it may interfere with the filling out of the missing data. That's why I would hide the field (as I said, I would plaster it in big letters across the whole page). Hiding it again also makes sure you don't have to add any logic that hides it when the form is completely filled out.