Wizard next step button taking me to the bottom of next page

  • 1
  • Problem
  • Updated 1 year ago
  • Solved
  • (Edited)
Hi All,

I have a wizard with 4 steps. When I click 'Next' button on step1, it is taking me to the bottom of second page and I need to scroll up to to see the fields at the top of the page. It is happening for 'Previous' step too and on all pages. 

Expectation: upon clicking 'Next' button, it should take me to the top of the next page. 

Could you please help me with this issue? Thanks!
Photo of Chandra R

Chandra R

  • 300 Points 250 badge 2x thumb

Posted 1 year ago

  • 1
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
I believe that skuid will automatically navigate to the first editable input field on the wizard. If your first input field is at the bottom, that is what you will see. Is that what is happening for you?
Photo of Chandra R

Chandra R

  • 300 Points 250 badge 2x thumb
Thanks for your response, Matt! All are editable fields on the wizard. 
Photo of Chandra R

Chandra R

  • 300 Points 250 badge 2x thumb
Added the below as In-Line (Snippet) and used it as last action for the Next button. Then it is taking me to the top of the page. 

var $ = skuid.$;

var topPosition = $('.nx-page').offset().top;


// Scroll to top of window

$('body').scrollTop(0);
Photo of Janick

Janick

  • 916 Points 500 badge 2x thumb
Thank you for sharing this with the community Sarath. This will probably be helpful for someone else in the future!