How to programmatically select items in a multiselect ?

Hello,

I have a multiselect in a form and I would like to select one or several of its items programmatically. How should I do ?

Thank you,
Barth

Hello
There are 2 ways:

  1. you can get multiselect by getSelect method and select values by native select’s methods
  2. you can use form.setItemValue(name, [opt1, op2, …]) - it will select items sollection