beforeHide
fires before a control or its checkbox is hidden
beforeHide: (value: {[id: string]: boolean | string}, id?: string, init?: boolean) => boolean | void;
Parameters:
value: object
- the current value of the control. The object contains a set of key:value pairs where the key is the id of a checkbox and the value is the value/state of the checkbox.id?: string
- optional, the ID of a checkbox of the controlinit?: boolean
- optional, true, if the event is triggered on the control initialization; otherwise, false
Returns:
Return false
to prevent a control or its checkbox from being hidden; otherwise, true
.
Example
form.getItem("CheckboxGroup").events.on("beforeHide", function(value, id, init) {
console.log("beforeHide", value, id, init);
return true;
});
Related sample: Form. Hide/Show control
Change log:
The id parameter was added in v8.0