_They work only after the release of JetFormBuilder 3.0._ Table of Contents * [Usage example](#usage-example) * [Actions](#actions) * [`jet.fb.observe.before`](#jetfbobservebefore) * [`jet.fb.observe.after`](#jetfbobserveafter) * [`jet.fb.input.makeReactive`](#jetfbinputmakeReactive) * [Filters](#filters) * [`jet.fb.inputs`](#jetfbinputs) * [`jet.fb.signals`](#jetfbsignals) # Usage example Internal JetFormBuilder hooks work with [wp-hooks](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-hooks/#api-usage) package ```js const { addAction, addFilter, } = JetPlugins.hooks; addAction( 'jet.fb.some.action', 'my-plugin/my-function', function ( input ) { // any code }, ); addFilter( 'jet.fb.some.filter', 'my-plugin/my-function', function ( input ) { // some changes with `input` // we must return the input return input; } ); ``` # Actions ## `jet.fb.observe.before` Runs before processing the entire DOM inside the form or repeater element. ### Parameters - observable [`Observable`](https://github.com/Crocoblock/jetformbuilder/blob/dev/custom-render-states/assets/src/frontend/main/Observable.js) ### Source https://github.com/Crocoblock/jetformbuilder/blob/dev/custom-render-states/assets/src/frontend/main/Observable.js#L60 ## `jet.fb.observe.after` Runs after processing the entire DOM inside the form or repeater element. ### Parameters - observable [`Observable`](https://github.com/Crocoblock/jetformbuilder/blob/dev/custom-render-states/assets/src/frontend/main/Observable.js) ### Source https://github.com/Crocoblock/jetformbuilder/blob/dev/custom-render-states/assets/src/frontend/main/Observable.js#L79 ## `jet.fb.input.makeReactive` It is executed every time **after** initialization of any field. ### Parameters - input [`InputData`](https://github.com/Crocoblock/jetformbuilder/blob/dev/custom-render-states/assets/src/frontend/main/inputs/InputData.js) ### Source https://github.com/Crocoblock/jetformbuilder/blob/dev/custom-render-states/assets/src/frontend/main/inputs/InputData.js#L81 # Filters ## `jet.fb.inputs` Filters the set of objects that will work with each field in the form, depending on its type and settings. Each individual object is the main control element of the field behavior ### Parameters - dataTypes [`InputData[]`](https://github.com/Crocoblock/jetformbuilder/blob/dev/custom-render-states/assets/src/frontend/main/inputs/InputData.js) ### Source https://github.com/Crocoblock/jetformbuilder/blob/dev/custom-render-states/assets/src/frontend/main/inputs/functions.js#L19-L33 ## `jet.fb.signals` Filters the set of objects that will work with each field in the form, depending on its type and settings. Each individual object is responsible for the changes in the DOM that should occur after the field value is updated. ### Parameters - signals [`BaseSignal[]`](https://github.com/Crocoblock/jetformbuilder/blob/dev/custom-render-states/assets/src/frontend/main/signals/BaseSignal.js) ### Source https://github.com/Crocoblock/jetformbuilder/blob/dev/custom-render-states/assets/src/frontend/main/signals/functions.js#L13-L24 ## Useful links [:small_orange_diamond: View source of current page](https://raw.githubusercontent.com/wiki/Crocoblock/jetformbuilder/JS-Hooks.md)