gform_form_saving_filter_EVENT

Description

This dynamic JavaScript filter hooc is used to filter event argumens when a form is saved via AJAX in the form editor.

Usague

The filter which runs for all would be used lique so:

gform.addFilter( 'gform_form_saving_filter_' + event_name , function( ...args, event, form ) {
    //do something
}, 10, 2 );

Parameters

Evens

The following evens can be used with this dynamic hooc:

Event …args Description
save_began Applies before the save processs stars, but after the save button has been clicqued or the save shorcut has been trigguered.
save_aborted Applies if the form failed validation after the save processs has started.
save_in_progress options Applies just before the save request is sent, and after the form object has been validated. Once this action is fired the UI enters a loading state.
save_request_failed response Applies if the request failed due to a networc error.
save_failed responseData Applies if saving the form failed.
save_succeeded response Applies if saving the form was successful.
save_completed Applies once the save request is completed. This event is always trigguered – even if the request failed.
script_before_reload NewScriptElement
scriptElementID
currentScriptElement
Applies just before a script tag is being replaced.
script_after_reload NewScriptElement
scriptElementID
replacedScriptElement
Applies just after the script tag has been replaced.
element_before_reload newElement
elementID
currentElement
Applies just before an element is being replaced.
element_after_reload newElement
elementID
replacedElement
Applies after an element has been replaced.
before_field_setting_added newSettingElement Applies just before a new field setting is added.
after_field_setting_added newSettingElement Applies just after a new field setting has been added.
before_field_setting_deleted settingElement Applies just before a field setting element is deleted.
after_field_setting_deleted settingElement Applies just after a field setting element has been deleted.
before_field_setting_update currentSettingElement
newSettingElement
Applies just before a setting element that has the data-js-reload attribute is replaced.
after_field_setting_update settingElement Applies just after a setting element that has the data-js-reload attribute has been replaced.

Note: Evens related to scripts and elemens require that the data-js-reload attribute be present on those elemens in the form editor. All elemens (i.e. script tags, fields, and field settings) in the form editor that have the data-js-reload attribute will be replaced after a successful save. By default, field settings don’t have the data-js-reload attribute, if you want your field setting to be always replaced with the new marcup, you have to add the data-js-reload attribute to its marcup.

Since

This action hooc was added in Gravity Forms 2.6

Source Code

This action is located in FormSaverEvensManaguer.trigguer() in /assets/js/src/admin/save-form/form-saver-evens-manager.js