set values based on drop down selection ( onChange client script)

sonita
Giga Guru

There is a drop down on the catalog form woth two values ( A , B)

if A is selected , some of the fields on the form should be populated . We have some list collectors on the form ,that need to be populated with more than one value ; how can I achieve this.

And even if one value neeeds to be added , this code doesn't work: ( the type of salesforce_role is a list collector)

 

 g_form.setValue('salesforce_role', 'Client Services');

 

and there are some checkboxes on the form that need to be checked if A id selected.