• Resolved crownst

    (@crownst)


    When I create a quiz and click start (orr next button) on the quiz. Then it will automatically scroll to the heading of the quiz. Is it possible to stop this? I think it’s very disturbing when you really don’t want to because it just doesn’t fit. Can this be exhibited? I didn’t find anything about it in the Forminator settings.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Nebu John – WPMU DEV Support

    (@wpmudevsupport14)

    Hi @crownst,

    I hope you are keeping well and thank you for reaching out to us.

    It’s not possible to disable the scroll effect on a Formiantor Quiz out of the box. Could you please try adding the following code snippet using a mu-plugin and check if that helps?

    <?php
    add_action('wp_footer', 'wpmudev_quiz_scroll_quest_fix', 9999);
    function wpmudev_quiz_scroll_quest_fix() {
    	global $post;
    	if ( is_a( $post, 'WP_Post' ) && !has_shortcode($post->post_content, 'forminator_quiz') ) {
    		return;
    	}
    	?>
             <script type="text/javascript">
             jQuery(document).ready(function($){
                setTimeout(function() {
                    $('.forminator-quiz').trigger('after.load.forminator');
                },100);
    
                $(document).on('after.load.forminator', function( e, formID ) {
                    var form_id = e.target.id;
                    jQuery('#'+form_id).find('.forminator-quiz-start').on('click', function(){
                        setTimeout(function(){
                            jQuery("html, body").stop();
                        },100);
                    });
                });
    
                jQuery( document ).on('forminator.front.pagination.move', function( e ) {
                    setTimeout(function(){
                        jQuery("html, body").stop();
                    },100);
                });
        });
        </script>
        <?php
    }

    We recommend testing this on the dev/staging version first before putting it on the live site. I hope the following guide comes in handy: https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins

    Kind Regards,
    Nebu John

    Plugin Support Dmytro – WPMU DEV Support

    (@wpmudevsupport16)

    Hello @crownst,

    I hope the provided PHP snippet helped, and works as expected.

    We’ll be marking the thread as resolved. Please feel free to re-open it, in case you still need any further assistance.

    Best Regards,
    Dmytro

    Plugin Support Dmytro – WPMU DEV Support

    (@wpmudevsupport16)

    Marked as resolved by support staff.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Disabling Automatic Scrolling’ is closed to new replies.