Hello @pbotega ,
From what I understand you are asking about the form scrolling to the top when going to the next step?
In this case, this is the expected effect – filling of the form starts at the top, so the form will always scroll to the start of the form.
kind regards,
Kasia
Its not that.
What I mean is that when I click to go to the next step, the window moves so my form gets centralizes at the screen. I dont want that to happen.
This is a video i recorded showing you whats going on:
https://www.awesomescreenshot.com/video/8773516?key=f422b4b1a2f58582d55faf054e9b3fee
Hi @pbotega
Please try adding this code to the site as Must Use plugin:
<?php
/**
* Plugin Name: [Forminator Pro] - Fix Scroll Issue
* Description: [Forminator Pro] - Fix Scroll Issue
* Author: Prashant Singh @ WPMUDEV
* Author URI: https://premium.wpmudev.org
* License: GPLv2 or later
*/
if ( ! defined( 'ABSPATH' ) ) { exit; } elseif ( defined( 'WP_CLI' ) && WP_CLI ) { return; }
add_action( 'wp_footer', function(){
global $post;
if ( is_a( $post, 'WP_Post' ) && !has_shortcode( $post->post_content, 'forminator_form' ) ) {
return;
}
if( wp_is_mobile() ){
?>
<script type="text/javascript">
jQuery(document).ready(function ($) {
$(document).on("after.load.forminator", function (e, id) {
$(document).on('click', '.forminator-pagination-footer .forminator-button', function(e){
var wpmu_scroll_top = $(window).scrollTop();
if (!wpmu_scroll_top){
$("html,body").stop();
}
});
});
});
</script>
<?php
}
},9999);
– create an empty file with a .php extension (e.g. “forminator-stop-form-move.php”)
– copy and paste code into it
– save file
– upload it (using e.g. cPanel File Manager or your favorite FTP client) to the “/wp-content/mu-plugins folder of your site’s WordPress installation
If your site is cached, do clear all the cache after adding the file. Once it’s done, check the form and let us know, please, if it solves the issue for you.
Kind regards,
Adam
Hello @pbotega ,
We haven’t heard from you for some time now, so it looks like you don’t have any more questions for us.
Feel free to re-open this ticket if needed.
Kind regards
Kasia