I'm trying to work out a way to overcome page auto-scrolling to the top after every click on Next/Prev buttons of a multipage form. Forces the user to have to scroll down to the bottom of the page where the form is loaded after each navigation click (if they can decipher what has happened). I thought the loading of pages would be by jquery.
you can add the following JS code in a JS view to your "next" page:
this code is for v7 and can be improved if you use v8 because there is a core function for that
document.addEventListener("DOMContentLoaded", function (event) {
window.scrollTo({
top: document.querySelector(".chronoform").getBoundingClientRect().top,
behavior: "smooth"
});
})
this code is for v7 and can be improved if you use v8 because there is a core function for that
You need to login to be able to post a reply.