beforeChange
fires before changing the value of a control
beforeChange: (value: object[], file?: object) => boolean | void;
Parameters:
value: object[]
- the value expected to be applied after changesfile: object
- optional, the changed element
Returns:
Return false
to prevent changing the value of the control; otherwise, true
.
Example
form.getItem("simplevault").events.on("beforeChange", (value, file) => {
console.log("beforeChange", value, file);
return true;
});
Change log:
added in v8.2