6 Replies Latest reply on Apr 23, 2016 6:42 AM by gkaiseril

    Is it possible to use javascript to get to auto populate date AND lock the form?


      I am using Adobe Pro XI, I have a script that will auto populate the date once digitally signed.  I need to know how to also get the form to lock based on that signature as well.  Looking at the Properties for SIGNED, it appears that I can only choose "lock all fields" or enter a script.  The script I am currently using is:


      var currentTime = new Date()

      var month = currentTime.getMonth()+1

      var day = currentTime.getDate()

      var year = currentTime.getFulYear()

      var signingTime = month+"/"+day+"/"+year

      var f = this.getField("Date");

      f.value = signingTime;


      This works perfectly for auto-populating the date in another field, but I need to also lock the form.  Is there something I can add to this script to accomplish that?


      Thank in advance.