Dynamically change the combobox list in a form



I’ve got a form which includes two comboboxes. The contents of the second combobox depend on the selection a user makes in the first combobox. I’m able to retrieve the data from the first combobox and create a new array which should be used for the second combobox.

When I’m using just two comboboxes (NO FORM), I’m able to do myComboBox.data.parse(newArray). And that works just fine. But in a form that syntax won’t work. Neither does myForm.getItem(‘myCombo’).data.parse. I also can’t use the SetProperties on the attribute data.

Is there a way I can populate the entire combobox on the fly?



Please, try to use:

var myComboBox= form.getItem("myCombo").getWidget();

It is mentioned here:
right at the bottom of the page. :sweat_smile: