getValue

returns the current value of the control

string| array getValue( [object config] );

Parameters

configobjectadditional parameter (described below)

Returns

string| arraythe current value of the control

Example

webix.ui({
    view:"form", 
    elements:[
        { view:"button", id:"b1", value:"Edit", css:"webix_primary" },
        { view:"button", id:"b2", value:"Back", css:"webix_primary" }
    ]
});
 
$$("b1").getValue(); // returns "Edit"

Details

The returned value of the control may be a string with the selected options of a multicombo control. By default, selected values are returned in the comma-separated format. You can define other delimeter using the separator property.

The config parameter

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

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