gform_ajax_spinner_url

Description

This filter can be used to change the default AJAX spinner image

Usage

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.

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.

add_filter( 'gform_ajax_spinner_url', 'spinner_url', 10, 2 );
function spinner_url( $image_src, $form ) {
return "http://www.somedomain.com/spinner.png";
}

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