gform_load_field_settings

Description

Fires on the Form Editor page after a field’s settings panel has been opened and settings have been displayed.

Usage

<script type="text/javascript">
    jQuery(document).on('gform_load_field_settings', function(event, field) {
        // custom JS code here
    });
</script>

Parameters

ParameterTypeDescription
eventEvent ObjectDefault JS event object.
fieldarrayThe current field object.
formForm ObjectThe current form object.

Examples

This hook is primarily used in conjunction with the gform_field_standard_settings, gform_field_advanced_settings, and gform_editor_js hooks.

The gform_field_standard_settings and gform_field_advanced_settings hooks are responsible for displaying custom field setting UI. These hooks are typically used in conjunction with the gform_editor_js hook to output any JS required by the custom settings UI. As part of this process, the gform_load_field_settings JS hook can be used in the gform_editor_js PHP hook, to only perform certain actions once the field settings have loaded.

Placement

Reference the article Adding JavaScript Code to the Frontend of Your Site.

Source Code

This hook is located in gravityforms.js.