7 Replies Latest reply on Jun 20, 2017 10:58 PM by tt287000391

    Populate text field with current time upon signing




      I have used the following script from another thread to auto populate a text field with current date upon signing of a PDF form:


      // JavaScript code to add the date at signing time

          var currentTime = new Date()

          var month = currentTime.getMonth() + 1

          var day = currentTime.getDate()

          var year = currentTime.getFullYear()

          var signingTime = day +"/"+month+"/"+year  //Modify into your preferred format


          var f = this.getField("Text1");  //Modify the field name as necessary


          f.value = signingTime;

      (Original thread Can Acrobat auto populate a date field upon digital signature of a form? I didn't want to ask on there since the thread was so old.)


      This is working fine but I also want to add the current time to the box. This is to validate when a document was signed before being submitted and will work on 3 different signatures.


      Any ideas would be much appreciated.