• When a submit any form in Contact Form 7, clicking more than on time (while ajax is working for send email, feed screen etc.), i get sucessive submits. Since I send e-mails for feeding back the writer and my client, they receive many sucessive e-mails.

    I had to put in all pages a rotine for disable submit onclick. It seens to be working well, but I think that this wold be implemented inside the pluguin (otherwise, you will have to inject the code in all pages using a pluguin like Simple Custom CSS and JS). The advantage I see is that you dont have to intall an injector pluguin and also to have this code in all pages.

    Since I am not a programmer, may be the community can improve the below code. All recent solutions I´ve googled on the internet (http://epsiloncool.ru/programmirovanie/preventing-multiple-submits-in-contact-form-7 and https://wordpress.org/support/topic/disable-submit-button-while-loading/ ) don´t work with recent versions of COntact Form 7.

    Here is the code I am using now:

    
    jQuery(document).ready(function () {
      
     console.log("página carregada com prevenção duplo clique!");
     jQuery(document).on('click', '.wpcf7-submit', function(e){
         if( jQuery('.ajax-loader').hasClass('is-active') ) {
              e.preventDefault();
              jQuery('.wpcf7-form-control.wpcf7-submit.form__button').val('Por favor aguarde ...').attr('disabled', 'disabled');
              console.log("Botão desabilitado");
              return false;
         }
       	else
        {
           jQuery('.wpcf7-form-control.wpcf7-submit.form__button').val('Enviar').removeAttr("disabled");
           console.log("Botão habilitado");
        }
      }); 
      
    });
Viewing 16 replies (of 16 total)
  • this has just started to happen to me as well. nothing to do with multiple clicks either as i tried it on a clean page where submission was instant and i only clicked it once.

    this is looking bad when handing over the site to customers who get spammed with the same email!

Viewing 16 replies (of 16 total)
  • The topic ‘Multiple submissions when click submit many times’ is closed to new replies.