4 Replies Latest reply: May 4, 2012 9:12 AM by danialhanson RSS

    Automatically insert today's date upon opening


      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!