Prevent clear form on Submit
-
Hi,
I’d like to prevent the form from clearing on Submit.
I tried commenting the “reset” line on contact-form-7/includes/js/scripts.js
if ( 'mail_sent' == data.status ) { $form.each( function() { //this.reset(); } ); wpcf7.toggleSubmit( $form ); }and also adding this to the footer
<script type="text/javascript"> document.addEventListener( 'wpcf7mailsent', function( event ) { jQuery(‘.wpcf7’).find(‘form’)[0].reset(); }, false ); </script>But the form still clears. Any ideas?
Thank you
The topic ‘Prevent clear form on Submit’ is closed to new replies.