Skip to main content
Participant
January 16, 2018
Question

Date & Time only shows when using "Document WIll Print" ,but I need the Fields (Date & TIme) to return to a blank or null state so I don't get the save prompt

  • January 16, 2018
  • 1 reply
  • 253 views

I'm using the "document will print" action to generate a date & time when the document gets printed. What I'm trying to do after wards using the "document did print" action is return the date & time fields back to an empty state so I don't have to save when closing the PDF.

I was heading n this direction...I was just trying to get the date to disappear after printing which I did by placing the following in the "document did print" action box

this.getField("Time").value = ""

this.getField("Date").value = ""

BUT i still get the prompt to save the file afterwards...I guess there's no way around this without disabling the save prompt?

This topic has been closed for replies.

1 reply

Joel Geraci
Community Expert
Community Expert
January 16, 2018

Add the line...

this.dirty = false;

to the end of your script. It specifies whether the document needs to be saved as the result of a changes to the document.