Description
Use this filter to modify the element after which the spinner will be inserted. 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
Examples
1. Specify a Custom Target for the Spinner
gform.addFilter( 'gform_spinner_target_elem', function( $targetElem, formId ) {
return $( '#my-custom-elem' );
} );
Placement
Your code snippet can be placed in an HTML field on your form or in a theme custom JavaScript file.
See also the JavaScript/jQuery section in this article: Where Do I Put This Code?
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.