Scroll to top of form?

Is it possible to issue a “scroll to top” command on a form? For example, with simple html we can create a link to “#” and jump to the top of the page. Can we do the same in an anvil form during a button click event?

My reason for doing this is because iOS devices zoom in / scroll down when focusing on an input box, and this disrupts the flow of my page. Once the input box has been filled out, I would like the pageview to be at the top of the form again, and not scrolled down 20% of the page.

You can scroll to any component on the form. See the section on scrolling here: Anvil Docs | Basic Components

2 Likes