11 Replies Latest reply on Dec 19, 2014 8:22 AM by vanja855

    dynamic drop down menu

    vanja855

      Hello all,

       

      I am trying to make a dynamic drop down menu in which the parameters depend on the another drop down menu.

      So far I made a code that looks like this, but it has a bug; whatever I choose, the actual field value is always the first menu value (a1 or b1). Anybody help, thanks?

       

      if (this.getField("another drop down").value=="Value1")

      {

      var c = this.getField( "dynamic drop down")

                      c.setItems([["a1"],["a2"],["a3"]])

      }

       

      else if (this.getField("another drop down").value=="Value2")

      {

      var c = this.getField("dynamic drop down")

                      c.setItems([["b1"],["b2"],["b3"]])

      }