JS Filters
lzb.editor.control.updateValue
Filters control value right before update it.
Attributes
Name | Type | Description |
---|---|---|
val | Mixed | control value |
control | Object | control data |
childIndex | Int | control index inside a repeater |
Additional Filters
Name | Description |
---|---|
lzb.editor.control.CONTROL_TYPE.updateValue | specific controls only |
Usage
JS
wp.hooks.addFilter(
"lzb.editor.control.updateValue",
"my.custom.namespace",
function (val, control, childIndex) {
console.log(val, control, childIndex);
return val;
}
);
JS
wp.hooks.addFilter(
"lzb.editor.control.checkbox.updateValue",
"my.custom.namespace",
function (val, control, childIndex) {
console.log(val, control, childIndex);
return val;
}
);
Previous Articlelzb.editor.control.getValueNext Articlelzb.components.PreviewServerCallback.onBeforeChange