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!