This repository has been archived by the owner on May 13, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 129
GUI Hooks
Phat Tran edited this page Sep 26, 2018
·
1 revision
Pass into the options
property:
<form-builder type="gui" v-model="formValues" :form="formConfigData" :options="formBuilderOptions"></form-builder>
With your option hooks like this:
data() {
return {
formBuilderOptions: {
hooks: {
'Section.beforeRegister': function(sectionInfo) {
// action here, you can use sectionInfo object...
}
... // more hooks below...
}
}
}
}
Hook Name | Passed Parameters | Description |
---|---|---|
Section Hooks | ||
Section.beforeRegister | object sectionInfo |
Before a section will be render. |
Section.afterRegister | object sectionInfo | After a section has just rendered. |
Dynamic Section Hooks | ||
DynamicSection.beforeInitClone | object/array cloneSectionData |
Before form builder cloning the section data for duplicating. |
DynamicSection.beforeAddInstance | object sectionInfo |
Before add new clone instance. Return false to stop adding process. |
DynamicSection.afterAddInstance | object sectionInfo | After a new instance has just added. |
DynamicSection.beforeRemoveInstance | object sectionInfo |
Before remove a specific instance. Return false to stop removing process. |
DynamicSection.afterRemoveInstance | object sectionInfo |
After a specific instance has just removed. |
Control Hooks | ||
Control.beforeRegister | object controlInfo | Before a control will be rendered. |
Control.afterRegister | object controlInfo | After a control has just rendered. |
Control.afterInit | object controlInfo, jQuery controlSelector | After initiated a control. |
Your needed hook doesn't available? Contact me. If it's worth to create, I would gladly create a new specific hook for you :D
Copyright © by Seth Phat aka Phat Tran Minh - http://sethphat.com
- Home