I believe this is default behavior for Contact Form 7. You can probably get better help on their forum or website.
https://contactform7.com/
Thanks for your note. Allow me to clarify as I do not think this is default behavior. After submitting a normal CF7 form, the form remains on the page and the form displays the message indicating that it was sent successfully.
When the CF7 Multi-Step form is submitted, the form immediately disappears. At least, this is what occurs on my site. I’d like for the form to remain so that users can read the message indicating its successful submission. Any suggestions?
Thank you
Ah sorry about that. The form disappearing is caused by this plugin. You should see the message about the form being successfully sent though.
The reason the form gets hidden is because the user is on the last step and would not be able to re-submit the form.
If you are able to add javascript to the page you can re-show the form using the code below:
document.addEventListener( 'wpcf7mailsent', function( e ) {
jQuery('#' + e.detail.unitTag + ' form').children().show();
});
-
This reply was modified 8 years, 1 month ago by
webheadcoder.
Thanks for providing the javascript code. I’m familiar with adding scripts and functions to WordPress sites. However, this js code doesn’t appear to work.
Did you test the snippet on your site and it worked? I included it in functions.php with an add_action on wp_footer, it doesn’t appear to work.
Any suggestions? Thanks again
hmm make sure it’s enclosed in the <script> tags.
<?php
function my_function() {
?>
<script>
document.addEventListener( 'wpcf7mailsent', function( e ) {
jQuery('#' + e.detail.unitTag + ' form').children().show();
});
</script>
<?php
}
add_action( 'wp_footer','my_function' );
I’m having a similar problem. When the form is submitted on the last step the “Success message” does not appear. The form just disappears.
Is there a fix to make sure the success or error message is displayed?
Thank you!