1 Reply Latest reply on Jul 16, 2013 2:54 AM by try67

    Script to complete date field and deactivate form

    KCott46

      Hi all,

       

      With little experience of Adobe I have been tasked to create a set of PDF forms for use within my company. I have designed the forms using Pro but I require a digital signature field that will complete a seperate date field upon signing and also deactivate certain fields within the form. At the moment I can get it to do either one or the other but I cannot get it to do both.

       

      Is there a script which I can use to carry out these functions?

       

      Thanks,

       

      KC

        • 1. Re: Script to complete date field and deactivate form
          try67 MVP & Adobe Community Professional

          As you probably saw, there's an option under the Signed tab to execute a script when a digital signature is applied.

          To do what you described the following code can be used (of course, you'll need to adjust the field name):

           

          this.getField("SignatureTime").value = util.printd("mm/dd/yyyy", new Date()); // populate the date field with the current date

          this.getField("Text1").readonly = true; // Set some fields as read-only

          this.getField("Text2").readonly = true;

          this.getField("Text3").readonly = true;

          this.getField("Text4").readonly = true;

           

          etc.