6 Replies Latest reply on Nov 3, 2015 12:22 PM by Rwhitehead0040

    Creating a Select All Check Boxes Button in Acrobat XI Pro


      I am trying to use Acrobat XI Pro to create a form button that will select all check boxes in a document (or even just a selection of check boxes). I am not familiar with JavaScript, but I found the following code online and tried to use it as an action for the button. Nothing happens...


      var nNumFields = this.numFields; // get the number of fields in the PDF;

      console.println("There are " + nNumFields + " in this document.") // show the number of fields;

      var cFieldName; // variable for field name to process;

      var oField; // varialbe for file object to process;

      for(i = 0; i < nNumFields; i++) {

      // get each field in the PDF;

      cFieldName = this.getNthFieldName(i); // get i field name;

      oField = this.getField(cFieldName); // get field object for named field;

      // test for check bosx type;

      if(oField.type == "checkbox") {

        // set style to cross;

        oField.style = style.cr;

        // set other properties as needed

        // show the field that has been changed;

        console.println(oField.name + " of field type " + oField.type + " has been changed to a cross.");

        } // end check box type;

      }// get next field to process;


      Can anyone help?