setValues

sets values for all inputs in the component

void setValues(object values, [boolean update,any config] );
valuesobjectan object with "property:value" pairs
updatebooleanif true updates the form with new values while exisitng values remain, false by default - all old values are cleared
configanyoperation object

Example

const record = new webix.DataRecord({});
record.setValues({
  name: "Percent", 
  val: 3
});

Related samples

Details

The setValues method called only with the first parameter changes all values, regardless the values specified in the first parameter. The first parameter is an object with "key-value" pairs. Where key is a name of the form field, and value is the new value for the field.

$$("record").setValues({
    field_a: "London", 
    field_b: "New York"
});

The config parameter can be of any type (from a string to an object). It will be passed to the onChange event as the 2nd parameter.

See also
Back to top