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.

Hierarchy

  • SelectMainControl
    • ListboxUnordered

Properties

element: HTMLSelectElement

Accessors

  • get multiple(): boolean
  • Retrieves the boolean value indicating whether multiple items can be selected from a list.

    Returns boolean

    Example

    var ctrl = ix.api.dom.getControl("<ELEMENT-GUID>");
    var allowsMultiple = ctrl.multiple;
    console.log(allowsMultiple);
  • get required(): boolean
  • Check if input is required.

    Returns boolean

    Example

    var ctrl = ix.api.dom.getControl("<ELEMENT-GUID>");
    var isRequired = ctrl.required;
  • set required(value): void
  • Set input to required / not required.

    Parameters

    • value: boolean

    Returns void

    Example

    var ctrl = ix.api.dom.getControl("<ELEMENT-GUID>");
    ctrl.required = true;

Methods

  • Checks the controls validity.

    Returns Promise<ValidationInfo>

    Example

    var ctrl = await ix.api.dom.getControl("<ELEMENT-GUID>").checkValidity();
    
  • Deselects given entries.

    Parameters

    • entries: string[] | JQuery<HTMLElement>
    • Optional fireOnchange: boolean

      Triggers the onchange event.

    Returns void

    Example

    // 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.

    Returns null | string | string[]

    Display text of the selected option as string.

    • It returns null when no option is selected
    • An array containing the value of each selected option when there is at least one and it is possible to select more.

    Example

    var ctrl = ix.api.dom.getControl("<ELEMENT-GUID>");
    var displayVal = ctrl.getDisplayValue();
  • Returns matching entries.

    Parameters

    • Optional dataName: string
    • Optional dataValue: string

    Returns null | JQuery<HTMLElement>

    Example

    var ctrl = ix.api.dom.getControl("<ELEMENT-GUID>");
    var entries = ctrl.getEntries();
  • Returns a list with all selected entries.

    Returns null | JQuery<HTMLElement>

    Example

    var ctrl = ix.api.dom.getControl("<ELEMENT-GUID>");
    var selectedEntries = ctrl.getSelectedEntries();
  • Get the current value of the control.

    Returns string

    Value of the form element as string.

    • It returns null when no option is selected
    • An array containing the value of each selected option when there is at least one and it is possible to select more.

    Example

    var ctrl = ix.api.dom.getControl("<ELEMENT-GUID>");
    var val = ctrl.getValue();
  • Checks if at least one option is selected from current control instance.

    Returns boolean

    It returns true when at least one option is selected.

    Example

    var ctrl = ix.api.dom.getControl("<ELEMENT-GUID>");
    console.log(ctrl.hasValue());
  • Reloads the control.

    Parameters

    • reset: boolean

      Reset the control to its first entry.

    Returns Promise<void | Error>

    Example

    var ctrl = ix.api.dom.getControl("<ELEMENT-GUID>");
    ctrl.reload();
  • Deselects all entries.

    Parameters

    • Optional fireOnchange: boolean

      Triggers the onchange event.

    Returns void

    Example

    var ctrl = ix.api.dom.getControl("<ELEMENT-GUID>");
    // Without triggering onchange event
    ctrl.reset();

    // With triggering onchange event
    ctrl.reset(true);
  • Selects all entries.

    Parameters

    • Optional fireOnchange: boolean

      Triggers the onchange event.

    Returns void

    Example

    var ctrl = ix.api.dom.getControl("<ELEMENT-GUID>");
    // Without triggering onchange event
    ctrl.selectAllEntries();

    // With triggering onchange event
    ctrl.selectAllEntries(true);
  • Selects the first entry.

    Returns void

    Example

    var ctrl = ix.api.dom.getControl("<ELEMENT-GUID>");
    ctrl.selectFirstEntry();
  • Sets the control required or not required.

    Parameters

    • value: boolean

    Returns void

    Example

    var ctrl = ix.api.dom.getControl("<ELEMENT-GUID>");
    ctrl.setRequired(true);
  • Set value of the control.

    • can be asynchronous, depending on the control type.

    Parameters

    • value: string | string[]

      The value to be set.

    • Optional settings: {
          triggerOnchange: TriggerValues;
      }

    Returns void

    Example

    var ctrl = ix.api.dom.getControl("<ELEMENT-GUID>");
    // Select entry with value 'Entry 1'
    ctrl.setValue("Entry 1");
  • Dispatches the onchange event.

    Returns void

    Example

    var ctrl = ix.api.dom.getControl("<ELEMENT-GUID>");
    ctrl.triggerOnchange();