Hi,
I solved that problem changing the loading icon for a bigger one to let the people know that there is a pending submition. Download the plugin called “Contact Form 7 Custom Spinner” and try it.
@thehowarde
Whats the best way to use that code? Could I just put it in between <script></script> on the contact form page? Or does it need to be in a .js file?
UPDATE 1: I tried adding the code block below on the page above the contact form, but it did not work.
UPDATE 2: Maybe it did work? It allows me several clicks still, but only 1 email comes through. Should the button be graying out?
<script>
jQuery(document).on('click', '.wpcf7-submit', function(e){
if( jQuery('.ajax-loader').hasClass('is-active') ) {
e.preventDefault();
return false;
}
});
</script>
-
This reply was modified 6 years, 8 months ago by
krashx6.
-
This reply was modified 6 years, 8 months ago by
krashx6.
-
This reply was modified 6 years, 8 months ago by
krashx6.
-
This reply was modified 6 years, 8 months ago by
krashx6.
Hi @krashx6 if you want to gray out the button, you should add a line in the jquery script between the preventDefault and return false to
$('.css-class-of-button').prop('disabled', true);
@thehowarde Thanks bud! I’ll give it a try tonight and report back.
You’ve been a tremendous help.