Forum Discussion

BrettConlon's avatar
BrettConlon
Community Member
2 months ago

How to get a Text Entry field to auto-focus on a layer when it loads

G'day,

I have a Text Entry field that I'd like to have auto-focus when the layer it's sitting on is triggered to load so you can immediately start typing into it. At the moment, the field sits on top of a coloured box with a "Continue" button next to it. It's a field that the Learn Admin enters a password into, which then puts the course into "Admin mode" allowing them to jump around the course without the usual "NEXT" button restrictions - helpful for quickly troubleshooting course issues. When the "Admin Access layer loads, the field is not focused and you have to first click in the field before you can start typing.

I read another Storyline Forum thread (HERE) on this same issue and they recommended using the "Focus Order" window to set the order of the objects that get jumped to when the user presses the Tab key, but I don't want them to have to press the tab key at all, I just need it to be automatically focused. Another contributor said that the object has to be at the bottom of the timeline (ie. the lowest object in the layering) and that actually works (the field is auto-focused when the layer appears) but I need my Text Entry field to be on top of a coloured box, so that's not going to work for me.

Is there another/proper way to achieve this?

As a workaround, I'm thinking of sending the Text Entry field to be the bottom object and then creating a series of boxes that surround the field (making it appear like its under the field), but I also have a larger 50% transparent, white box under that that I'll have to do the same thing with - a rather kludgy workaround.

Many thanks, Brett

  • Hi Brett,

    Have you tried making a new Master Slide with the colored box on it as part of the background design? Perhaps that way the colored box would not even be an item on the timeline. Then, the text entry box could sit on top of it and still be at the bottom of the timeline.

  • Nedim's avatar
    Nedim
    Community Member

    It would be beneficial to see your setup. I've attached a short screen recording of what I think you are trying to achieve. It all depends on the number of active elements on the slide and the focus order/priority in a given scenario. Needless to say, there are many options to achieve it or not achieve it at all.

  • BrettConlon's avatar
    BrettConlon
    Community Member

    Wow, I had no idea that my post actually went through. I kept getting timeout errors after pressing the submit button so I started again with a new post and, again, got a timeout error. Seems that I now have 2 posts on the forum. I'll delete the other one but first I'll get Andrew, who posted a great idea, to drop it in here first.