How to disabled Submite butten for multisubmitting?
-
Can you please tell me how to turn off a form if it has already been submitted once?
I’m trying to implement it through code.<script> const wpcf7Elm =document.querySelector( '.wpcf7' ); const sendBtn = document.querySelector('.wpcf7-submit'); wpcf7Elm.addEventListener( 'wpcf7mailsent', function( event ) { console.log("SEND FORM"); sendBtn.attr('disabled', true); setTimeout( function(){sendBtn.attr('disabled', false)}, 3000); }, false ); </script>
But it keeps sending the form if all required fields are filled in correctly.
How can it fix ?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘How to disabled Submite butten for multisubmitting?’ is closed to new replies.