Retrieves the boolean value indicating whether multiple items can be selected from a list.
var ctrl = ix.api.dom.getControl("<ELEMENT-GUID>");
var allowsMultiple = ctrl.multiple;
console.log(allowsMultiple);
Check if input is required.
var ctrl = ix.api.dom.getControl("<ELEMENT-GUID>");
var isRequired = ctrl.required;
Set input to required / not required.
var ctrl = ix.api.dom.getControl("<ELEMENT-GUID>");
ctrl.required = true;
Deselects given entries.
Optional
fireOnchange: booleanTriggers the onchange
event.
// Get control
var ctrl = ix.api.dom.getControl("<ELEMENT-GUID>");
// Get all selected entries
var selectedEntries = ctrl.getSelectedEntries();
// Deselect entries
ctrl.deselectEntries(selectedEntries);
Get the current value of the control.
Display text of the selected option as string.
null
when no option is selectedvar ctrl = ix.api.dom.getControl("<ELEMENT-GUID>");
var displayVal = ctrl.getDisplayValue();
Get the current value of the control.
Value of the form element as string.
null
when no option is selectedvar ctrl = ix.api.dom.getControl("<ELEMENT-GUID>");
var val = ctrl.getValue();
Selects all entries.
Optional
fireOnchange: booleanTriggers the onchange
event.
var ctrl = ix.api.dom.getControl("<ELEMENT-GUID>");
// Without triggering onchange event
ctrl.selectAllEntries();
// With triggering onchange event
ctrl.selectAllEntries(true);
Set value of the control.
The value to be set.
Optional
settings: { var ctrl = ix.api.dom.getControl("<ELEMENT-GUID>");
// Select entry with value 'Entry 1'
ctrl.setValue("Entry 1");
Extension of the Listbox control that shown as an unordered list in the browser.
Note
This control operates the same way on both edit and view pages. Refer to this documentation for guidance on its use on view pages as well.