getValue

returns the current value of the control

string|array getValue( [object config] );
configobjectadditional parameter (described below)
string|arraythe current value of the control

Example

webix.ui({
    view:"multicombo",
    id: "multi",
    label:"To", 
    value:"1,3", 
    suggest: names // or e.g. suggest: "data/names.js"
});
 
$$("multi").getValue(); // "1,3"

Details

The returned value of the control can be a string or an array depending on the stringResult property. By default, selected values are returned in the comma-separated format. You can define other delimiter using the separator property.

The config parameter

If you want to return a value as an array of options objects, specify the config parameter {options: true}:

console.log($$("multi").getValue({options:true}));
See also
Back to top