focusing on an entry box on page load

Hello

I feel like this should be really obvious, but I can't seem to find it anywhere.
Basically, on page load, I want to be focused on an entry box, so that the user can key straight into it without having to click onto it first.

Anybody know how to do this?

Thank you

Kind regards

Simon

Comments

  • ssneg
    ssneg Community Member Posts: 1,466 ☆ Roadie ☆
    Sure. Just add an OnShow action that runs the following JS:
    document.getElementById("entry142id").focus()

    Replace "entry142" part with whatever HTML name your entry box has. E.g. if it's "entry777" then you will have to use "entry777id".
  • Thanks Sergey :-)

    Helpful as always