# Set focus to next text input field

**URL:** <https://talk.atomisystems.com/t/set-focus-to-next-text-input-field/10142>\
**Category:** General\
**Created:** [April 17, 2026, 6:54am UTC](https://talk.atomisystems.com/t/set-focus-to-next-text-input-field/10142 "2026-04-17T06:54:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AP\_Beginnerin](https://talk.atomisystems.com/letter_avatar_proxy/v4/letter/a/779978/32.png) [@AP\_Beginnerin](https://talk.atomisystems.com/u/AP_Beginnerin)\
**Post date:** [April 17, 2026, 6:54am UTC](https://talk.atomisystems.com/t/set-focus-to-next-text-input-field/10142/1 "2026-04-17T06:54:06Z")

</div>

Hello

I need some help. I have various text input fields in my project. I would like the focus to switch to the next text input field after correctly sending the answer.

So what I mean is: I have field “X” and after typing the answer and sending it with “Enter” I want the field “Y” to be automatically focused so I can directly start typing the next answer.

Is there a way to do that with js?

I already enter the following js to the “On correct” of the first text input field but it’s not working:

prez.object(“Y\_Punkt1”).node.focus()

---

<div class="post-metadata">

**Author:** ![Hoanp](https://talk.atomisystems.com/user_avatar/talk.atomisystems.com/hoanp/32/3546_2.png) [@Hoanp](https://talk.atomisystems.com/u/Hoanp)\
**Post date:** [April 17, 2026, 7:16am UTC](https://talk.atomisystems.com/t/set-focus-to-next-text-input-field/10142/2 "2026-04-17T07:16:38Z")

</div>

Hi,

You can do that by adding the following JavaScript action to **On Text Enter** event of each text box:

```auto
 // replace next_textbox_name by the name of the next text box
prez.object('next_textbox_name').textNode.focus();

```

Regards,  
Hoa

---

<div class="post-metadata">

**Author:** ![AP\_Beginnerin](https://talk.atomisystems.com/letter_avatar_proxy/v4/letter/a/779978/32.png) [@AP\_Beginnerin](https://talk.atomisystems.com/u/AP_Beginnerin)\
**Post date:** [April 17, 2026, 7:29am UTC](https://talk.atomisystems.com/t/set-focus-to-next-text-input-field/10142/3 "2026-04-17T07:29:18Z")

</div>

This worked for me. Thank you very much.
