1 Reply Latest reply on Oct 12, 2014 9:38 AM by gkaiseril

    I NEED HELP IN JAVASCRIPT CODE FOR ACROBAT FORM XI

    ALDI Level 1

      I need that when the user had filled out part of the application form and it has been saved, the rest of the fields (check box, text field and dropdown list) that have not been run can be used when it has be re-opened again.

      The above-attached JavaScript code I am using has the disadvantage that requires a default value "select one" in the dropdown list” which I want to avoid.


       

      for (var i=0; i<this.numFields; i++) { 

          var f = this.getField(this.getNthFieldName(i));

          if (f==null) continue; 

          if (f.type=="button") continue;

          if (f.readonly==false && f.value!=f.defaultValue) { 

              f.readonly = true; 

           } 

      }


      If I do not set the value in the properties as default "select one" this code will apply the action " mode read only " which disables all other "downdrop list" that have not yet been used.


      Untitled1.png


      I will be very grateful for the help of those who so kindly collaborate in this forum.


      Aldi.

        • 1. Re: I NEED HELP IN JAVASCRIPT CODE FOR ACROBAT FORM XI
          gkaiseril MVP & Adobe Community Professional

          Duplicate of Help JavaScript code to form Acrobat XI

           

          Again, I would look at using the "defaultValue" of the field rather than the null string or other values. You can set the value as needed for each field as an option. The exception are the drop down and list box whose default value will be the highlighted field when form editing is closed. Note that the options can not be set to null by the UI, you need to enter a space, with  JavaScript one can add a null string.

           

          You may need to adjust for fields like buttons and signatures.

           

          Acrobat forms face a lot is security issues with HIPPA compliance that have to be addressed by resources outside of Acrobat.