Copy link to clipboard
Copied
Ist there a way to prevent printing a form until required data are filled into mandatory/compulsary fields?
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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
Find more inspiration, events, and resources on the new Adobe Community
Explore Now