2 Replies Latest reply on May 11, 2015 6:33 AM by tims82031744

    use dropdown to set value of checkboxes

    tims82031744

      Hello all, I am trying to use a dropdown field in a form to also check or uncheck various checkboxes based on value. I am trying something like the following:

       

      f = this.getField(event.target.name).value;

      g = this.getField("Checkbox1");

      h = this.getField("Checkbox2");

       

      if ( f == "Value1" )

           {

           g.value = true;

           h.value = false;

           }

      else

           {

           g.value = false;

           h.value = true;

           }

       

      and so on. This isn't working out the way I'd like. It's probably an easy syntax or terminology thing. Can anyone advise? Thanks!