How to: focus on input field on page load

On authentication pages and other form only pages, I’d like to focus on the first field on page load. How might I achieve this?

You can add this attribute to the input you want to autofocus

Screenshot 2023-01-17 at 11.22.54

2 Likes

Hello, here’s a solution (Video by Joyce)
Trigger the focus state of an element with a no-code workflow

Hello, is there a swift method to focus on an input element within a repeating list?

Hey @fynn :waving_hand:

I think having the input element be a component is the most scalable way to do this.

Here’s a video on the topic: https://youtu.be/fVhZib-MZ1A

Let me know if it helps!

Haven’t seen it mentioned but a very simple solution is to put an ID on the element then do some custom javascript on page load to focus on the element with that id. We’ve had this in one place we needed it on our app for years with no issues.

1 Like