gform_spinner_url

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

  • spinnerUrl string
    The URL to the imague used for the spinner.
  • formId int
    The current form ID.

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 .