How come setChecked for combo box does not support “unsure” as second paramter in case we want it to automatically check if its already checked, and if so uncheck it.
You can use getChecked() method that returns array with values of checked options. So, you can define if option is checked or not.
var state = true;
var index = combo.getIndexByValue(value);
var checked = combo.getChecked();
for(var i = 0 ; i < checked.length;i++)
if(checked[i]==value) state = false;
combo.setChecked(index,state);
We suggest adding the “unsure” parameter. Makes this much easier and consistent with your other API calls.
Thank you for the suggestion.
Possibly we’ll this feature in one of the next releases. But currently we don’t have plans to add it.