I wish to change the default ajax loader for gravity forms. I have done this using the following code (link found here):
add_filter( 'gform_ajax_spinner_url', 'cwwp_custom_gforms_spinner' );
/**
* Changes the default Gravity Forms AJAX spinner.
*
* @since 1.0.0
*
* @param string $src The default spinner URL
* @return string $src The new spinner URL
*/
function cwwp_custom_gforms_spinner( $src ) {
return get_stylesheet_directory_uri() . '/assets/img/css/newsletter-loader.gif';
}
This seems to work fine. What I would like todo is set another custom ajax spinner for a different form on a different page. The design of the page is different and I would like to set a different spinner. Any ideas how I do this?
Without testing, this should work (still use the add_filter bit):