Description
This filter can be used to change the default AJAX spinner image
Usage
1 | add_filter( 'gform_ajax_spinner_url' , 'custom_spinner_image' , 10, 2 ); |
You can also specify this per form by adding the form id after the hook name.
1 | add_filter( 'gform_ajax_spinner_url_6' , 'custom_spinner_image' , 10, 2 ); |
Parameters
- $image_src string
The spinner image URL to be filtered
-
$form Form Object
Current form.
Examples
Change the spinner image to a custom image file.
1 2 3 4 | add_filter( 'gform_ajax_spinner_url' , 'spinner_url' , 10, 2 ); function spinner_url( $image_src , $form ) { } |
Placement
This code should be placed in the functions.php file of your active theme.
Source Code
This filter is located in GFFormDisplay::get_form() in form_display.php