Support » Plugin: Forminator - Contact Form, Payment Form & Custom Form Builder » Thank you message before redirecting

  • Resolved kuduzovic

    (@kuduzovic)


    Hi! So I installed forminator, made a form, linked it to my page, set it to redirect to another link and everything works very well. But the only thing I noticed is that the thank you message only lasts for like 3 seconds before redirecting. So I wonder is there any way to make it last a bit longer before redirecting?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • eugene212

    (@eugene212)

    Hi @kuduzovic,

    Have you tried changing the setting for submission message duration (it’s under Behaviour settings) ?

    Regards,

    Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @kuduzovic

    I hope you are doing well.

    I’m afraid there is no option on the interface to modify the time for redirect, only for the Inline Message.

    A workaround is using a custom script,

    Modify your form to Inline Message instead of a redirect.

    Add this code using a mu-plugin:

    <?php
    
    add_action( 'wp_footer', function(){
    	global $post;
    	if( ! $post instanceof WP_Post || ! has_shortcode( $post->post_content, 'forminator_form' ) ) {
    		return;
    	}
    	?>
    	<script type="text/javascript">
    
    	jQuery('form.forminator-custom-form').on('forminator:form:submit:success', function (e, formData) {
    		setTimeout(function(){ window.location.replace("https://www.yourdomain.com"); }, 6000);
    
    	});
    	</script>
    	<?php
    }, 999 );

    If you are not familiar with mu-plugin, you will find the steps here:
    https://premium.wpmudev.org/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins

    Modify the “yourdomain.com” to your whished domain and page, also the 6000ms = 6s which is the time to the redirect.

    Let us know if you need any further help on this.
    Best Regards
    Patrick Freitas

    Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @kuduzovic

    I hope you are doing well.

    We haven’t heard from you in a while, I’ll mark this thread as resolved.

    However, feel free to let us know if you have any additional question or problem.

    Best Regards
    Patrick Freitas

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.