I need to clear all the options in select item using FormAPI. Following is the javascript code:
var options = navbarItem.getOptions();
for (var i=0; i.text);
navbarItem.removeOption(i);
}
But somehow it is only removing even number options. e.g. option at index 0, 2, 4, ...
Anybody knows a way-around to clear the options in select item