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:

I have the same Problem, but when i use:
var combo = _empb_edit_form.getItem(“kundennummer”).getWidget();

then i get:
getWidget is not a function


Unfortunately I was not able to reconstruct your issue locally.
Please, checck the following snippet:
If the problem still occurs for you please, provide a complete demo or a demo link, where the problem could be reproduced.

Thanks a lot,

my config was wrong, in my config was the type “select”.

greeting peer