2 Replies Latest reply on Jan 23, 2009 6:24 AM by gkaiseril

    populate a field with a date only once?

    lister110@hotmail.com
      Hello everyone, I have a small script which runs when the document opens and populates a field with the date, but I would like the date to be filled when the document is first opened, but then saved with that date. Could someone help with this script?

      code:
      // get new Date object
      var d = new Date();

      // format to mm/dd/yyyy
      var sDate = util.printd("dd/mm/yyyy", d);

      // insert date into form field
      this.getField("todaysDate").value = sDate;

      Thanks

      lister