Summary of details
In file /cred-frontend-editor/public/js/frontend.js the URL of the spinner is defined with loadingSpinnerImagePath line 36.
That would need some sort of filter applied, to allow us setting another URL of the spinner.
Or, a way to reset the .src attribute with JS (selector.src = "value") because in the same file, line 319 the spinner is appended to selector_to_append (the submit button).
Hi Beda,
Thank you for waiting and sorry about the delay in getting back on this.
During testing on my website, I wasn't able to modify the form's AJAX spinner either, without adding changes in the plugin's file.
If you're open to such a solution, you can follow these steps:
1. In your active theme's "functions.php" file, you can include some function to define a script variable value, that holds the new image's path:
Example:
function your_function() {
echo '<script id="cred_custom-AJAX-icon">
var cred_frontend_custom_AJAX_icon = {"url":"<em><u>hidden link</u></em>"};
</script>';
}
add_action( 'wp_footer', 'your_function' );
Note: for this example, I'm just using a hardcoded image's path, but you can generate it dynamically as needed.
2. Next, in the same "/cred-frontend-editor/public/js/frontend.js" file, you can update the function starting from line# 315, to check for this new var "cred_frontend_custom_AJAX_icon" and use it, if it is set:
startLoading: function( $selector_to_append, site_url ) {
var $body = jQuery("body");
$body.addClass("wpt-loading");
if(typeof cred_frontend_custom_AJAX_icon === 'undefined') {
var loading_icon = site_url + this.loadingSpinnerImagePath;
}
else
{
var loading_icon = cred_frontend_custom_AJAX_icon.url;
}
$selector_to_append.after('<span class="' + this.loadingSpinnerClass + '" style="margin-left:5px;"><img class="cred-form-loading-spinner-image" src="' + loading_icon + '"></span>');
},
I hope this helps.
regards,
Waqar
Editing core plugin files isn’t an option if we stay within serious and common rules of WordPress development
I’ll just create my own form for this, and deeply re-evaluate when/if to recommend toolset at all.
Given I know how Feature requests are „evaluated“ at toolset I’ll also not build on the false hope that the submitted request and the dozens of forum tickets requesting precisely this feature will ever be considered.
Thanks!