Description
The gform/form_editor/initialized event is triggered after the form editor has been initialized. It allows developers to perform actions once the editor is ready.
Usage
document.addEventListener( 'gform/form_editor/initialized', handleFormEditorInitialized );
const handleFormEditorInitialized = () => {
// Custom logic here.
};
Parameters
This event has no parameters.
Examples
Log a message to the console when the form editor is initialized.
document.addEventListener( 'gform/form_editor/initialized', function() {
console.log( 'Form editor has been initialized.' );
} );
Placement
Reference the article Adding JavaScript Code to the Frontend of Your Site.
Since
This event was added in Gravity Forms 3.0.
Source Code
This event is located in assets/js/src/admin/form-editor/layout/index.js.