Add select option by using javascript

I know there is way to set all select option by using javascript like this way :
frm.set_df_property('grading_subject', 'options', ['option a', 'option b']); frm.refresh_field('grading_subject');

is that anyway that i do not want to set, i just want to add the select option using javascript since i don’t delete the previous select option value ? Your help is greatly appreciated. Thank in advance.

I solve it…

The code is :

frm.set_df_property('grading_subject', 'options', [""].concat(itemShow));

Note: itemShow is an arraylist data type.

2 Likes