Skip navigation
Currently Being Moderated

Automatically insert today's date upon opening

May 4, 2012 8:58 AM

Tags: #javascript #acrobat_x #date #clock

How can I have a text field automatically update with the current date from the system clock upon opening of the document?


I have a read-only text field called "Current Date" and I can get this to work using the following script:

this.getField("Current Date").value = util.printd("mmmm dd, yyyy", new Date());


Unfortunately, this doesn't seem to be very consistent.  How can I get this to run, and recheck the system clock for the current date, every time the document is opened?


Thanks in advance for your help!


More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points