0 Replies Latest reply on Nov 3, 2008 9:24 AM by (Mike_M._Burke)

    checkboxes

      I am trying to control four checkboxes using a drop down list. The 4 CBs have values of "Read Only" and "Neutral" when the form is opened. I want them to remain this way if the user chooses "No" from the drop down. If the user chooses "Yes", I would like the values to change to "User Entered" and "Off". I was using "visible" and "invisible", using this code:

      if (xfa.event.newText == "(select)") //drop down list options are "select", "yes"," no"
      { app.alert("Please pick yes or no"); } //can not leave field empty
      else if (xfa.event.newText == "Yes")// Selected Yes,
      {
      xfa.form.F.P1.CheckBox24.presence = "visible"; xfa.form.F.P1.CheckBox27.presence = "visible";
      xfa.form.F.P1.CheckBox28.presence = "visible";
      xfa.form.F.P1.CheckBox32.presence = "visible";
      }
      else if (xfa.event.newText == "No") // Selected No
      { xfa.form.F.P1.CheckBox24.presence = "invisible"; xfa.form.F.P1.CheckBox27.presence = "invisible";
      xfa.form.F.P1.CheckBox28.presence = "invisible";
      xfa.form.F.P1.CheckBox32.presence = "invisible";
      }

      Can anyone show me the syntax for setting checkboxes to "Off" and not "Read Only". I would like the checkboxes to be visible, yet unavailable until the user selects "Yes" from the drop down list.