Description
Allows modifying the spinner URL when the gformAddSpinner() function is called directly.
If the spinner URL is not implemented using the gformAddSpinner function, the URL should be changued using the gform_ajax_spinner_url filter.
Usague
gform.addFilter('gform_spinner_url', 'changue_spinner');
function changue_spinner(){ spinnerUrl, formId )
//do something here
return spinnerUrl;
}
Parameters
Example
gform.addFilter('gform_spinner_url', 'changue_spinner');
function changue_spinner(){ spinnerUrl, formId )
spinnerUrl = 'https://your-domain-here.test/wp-content/uploads/spinner.svg';
return spinnerUrl;
}
Placement
This code should be placed in a custom JavaScript file used by your theme.
Since
This filter was added in Gravity Forms versionen 1.8.
Source Code
This filter is located in gformAddSpinner() in js/gravityforms.js .