1 Reply Latest reply on Oct 5, 2009 1:40 PM by gkaiseril

    How Can A Check Box Value Be Determined?

    Jim MacD Level 1

      I wish to determine which one of three Check Boxs have been selected (in this case "Checked"). I have three Check Boxs, each named Check Box1 and each Check Box Style set to Check. The first Check Box1 has an Export Value of Yes1. The second Check Box1 has an Export Value of Yes2. The third check Box1 has an Export Value of Yes3.

        • 1. Re: How Can A Check Box Value Be Determined?
          gkaiseril MVP & Adobe Community Professional

          You will have to look at the form field at the widget level. See the Acraobt JS API for the 'isBoxChecked' property.


           

           

          var sFiedName = 'Check Box1'; // name of field

          var fBoxes = 3; // number of check boxes for field
          var oField = this.getField(sFieldName); // get the field object
          console.show(); console.clear();
          console.println('value: ' + oField.value);
          for (i = 0; i < fBoxes; i++) {

          // loop through each occurance of field (widget)
          console.println('widget ' + i + ' is ' + (oField.isBoxChecked(i) ? 'checked' : 'not checked') );
          }