setValues

sets values into the inputs of a form/toolbar/property sheet control

void setValues(object values, [boolean update,any config] );
valuesobjecta object with "property:value" pairs
updatebooleanoptional, if true, updates the form with new values while existing values remain. false by default, all old values are cleared
configanyoperation config

Example

webix.ui({
    view:"toolbar",
    id:"toolbar1",
    elements:[
        { type:"text", name:"field_a" },
        { type:"text", name:"field_b" },
    ]
});
 
function set_toolbar(){
    $$("toolbar1").setValues({
       field_a: "London", 
       field_b: "New York"
    });
};

Related samples

Details

The method allows setting several values at a time. Data names of these values must coincide with values of the name parameters of the corresponding toolbar elements.

See also
Back to top
Join Our Forum
We've retired comments here. Visit our forum for faster technical support, connect with other developers, and share your feedback there.
If you have not checked yet, be sure to visit site of our main product Webix web ui framework and page of toolbar product.