Avatar

Correct answer by
Level 7

There are 2 ways you could do this. The first is just to have 3 seperate dropdown boxes for the second box and have them all hidden. The exit event of the first dropdown would then have code that would make the appropriate second box become visible, something like (in formcalc):

if ($ == 1) then

dropdownRed.presence = "visible"

dropdownBlue.presence = "hidden"

dropdownYellow.presence = "hidden"

elseif ($ == 2) then

dropdownRed.presence = "hidden"

dropdownBlue.presence = "visible"

dropdownYellow.presence = "hidden"

elseif ($ == 3) then

dropdownRed.presence = "hidden"

dropdownBlue.presence = "hidden"

dropdownYellow.presence = "visible"

endif

The other option is just to have one dropdown box which dynamically changes its options depending on the results of the first box. So in the preOpen event of the second box you could have something like (in formcalc):

if (dropdown1 == 1) then

$.clearItems()

$.setItems("Light red, dark red")

elseif (dropdown1== 2) then

$.clearItems()

$.setItems("light blue, dark blue")

elseif (dropdown1== 3) then

$.clearItems()

$.setItems("light yellow, dark yellow")

endif

View solution in original post