Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- const wpcf7Elm = document.querySelector( '.wpcf7 form' );
- const $formBtn = wpcf7Elm.querySelector( '.wpcf7-submit');
- const originalLabel = $formBtn.value;
- wpcf7Elm.addEventListener('submit', function(e){
- $formBtn.value = "Sending...";
- $formBtn.disabled = true;
- });
- wpcf7Elm.addEventListener( 'wpcf7submit', function( event ) {
- $formBtn.disabled = false;
- $formBtn.value = originalLabel;
- }, false );
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement