Each time I answer a question, the page scrolls a bit down

Hello @ferdistam,

I hope you’re doing great today!

In order to disable auto-scrolling, please add the following PHP snippet as a must use plugin:

<?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();
                    },10);
                });
            });

            jQuery( document ).on('forminator.front.pagination.move', function( e ) {
                setTimeout(function(){
                    jQuery("html, body").stop();
                },10);
            });
    });
    </script>
    <?php
}

– paste the code in your text editor, and save as a PHP file, for instance “forminator-quiz-scroll-fix.php”. Upload the saved file to /wp-content/mu-plugins/ directory on the server, and test the quiz again after refreshing the page.

I hope this helps. Please let us know if you have any questions.

Best Regards,
Dmytro

Awesome. Thank you very much Dmytro. It worked!

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer