• Resolved jonuxketux

    (@jonuxketux)


    Hi,

    I have a question about multiple behaviors.
    My form is situated in the end of the home page. Now I have ability to choose only one scenario after submission: thank you message (message appears but in order to see it you have to scroll down to that form cause the page reloads and starts from the beginning), or page reloads, scrolls down automatically to the form but there is no thank you message. Is it possible to have both of these scenarios?
    I have also tried to set both scenarios in one behavior step (one behavior option) by using tabs “Inline message” and “Redirect user to a URL” but works only one of them.
    If its necessary to set up conditions, maybe its possible to set a condition that could correspond to all forms, for example field Name is NOT NULL?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Laura – WPMU DEV Support

    (@wpmudevsupport3)

    Hi @jonuxketux,

    Hope this message finds you well.

    The form will scroll up after the submission if using Behavior >> After submission >> Inline Message method, it shouldn’t refresh the page.

    Still, to solve it our developers created this mu-plugin:

    <?php
    
    add_action( 'wp_footer', function(){
    	global $post;
        if ( is_a( $post, 'WP_Post' ) && !has_shortcode( $post->post_content, 'forminator_form' ) ) {
            return;
        }
        ?>
        <script type="text/javascript">
        jQuery(document).ready(function ($) {
            var animatedScroll = false;
            $(window).scroll(function(event){
                animatedScroll = $('html, body').is(':animated');
                if (animatedScroll) {
                    $('html,body').stop();
                }
            });
        });
        </script>
        <?php
    },9999);

    You might need to install it as a mu-plugin following the instructions on this link https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins.

    This will scroll down to the form and show the Inline Message once the form has been submitted.

    Let us know the results.

    Best regards,
    Laura

    Thread Starter jonuxketux

    (@jonuxketux)

    Hi, @laura,

    Yes, this code works, thank You. But after applying this to form google reCAPTCHA stopped working. It doesn’t appear at all in the end of the form and after filling in the form and pressing “Submit” button it throws an error – recaptcha error. I had to turn it off in order to submit the form.

    Thread Starter jonuxketux

    (@jonuxketux)

    Laura,

    Seems like it doesn’t work again. The page wont scrolls down to the form. Nothing helps (refreshing, cache removing). Beside my mu-plugin.php file appears one more file – form.php in mu-plugins folder. What is this?

    Plugin Support Nithin – WPMU DEV Support

    (@wpmudevsupport11)

    Hi @jonuxketux,

    Possible to share a page URL of the staging site where you notice the issue so that we can check what could be suggested further based on that?

    If you could also share the form export it would be helpful too. Please check the following doc on how to export a form:

    https://wpmudev.com/docs/wpmu-dev-plugins/forminator/#import-export

    If you are concerned about any sensitive information in the form, then you can duplicate your form, remove any sensitive information, and then export it.

    You can share the export file via Google Drive, Dropbox or any cloud service in the next reply.

    Looking forward to your response.

    Best Regards,

    Nithin

    Thread Starter jonuxketux

    (@jonuxketux)

    Hi,

    At this time we decided to use another. plugin. Thank You very much for your time.

    Plugin Support Nebu John – WPMU DEV Support

    (@wpmudevsupport14)

    Hi @jonuxketux,

    Apologies for the inconvenience caused and for the need to seek an alternative solution. Please don’t hesitate to contact us if you require any assistance; we’re here to help.

    Kind Regards,
    Nebu John

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