bookmark_bordergform_spinner_target_elem

Description

Use this filter to modify the element after which the AJAX spinner will be inserted for AJAX-enabled forms. By default, it will be the next button (for multi-page forms) or submit button.

Usage

gform.addFilter( 'gform_spinner_target_elem', function( $targetElem, formId ) {
    return $( '#my-custom-elem' );
} );

Parameters

  • $targetElem object

    jQuery object containing all of the elements after which the AJAX spinner will be inserted.

  • formId integer

    ID of the current form.

Examples

1. Specify a Custom Target for AJAX Spinner

gform.addFilter( 'gform_spinner_target_elem', function( $targetElem, formId ) {
    return $( '#my-custom-footer-elem' );
} );

Source Code

This filter is located in gformInitSpinner() in js/gravityforms.js

Since

This filter was added in Gravity Forms 2.0-beta-2.2.