Skip to main content
16-Pearl
September 2, 2025
Solved

How to auto-focus a Text Field in a Mashup?

  • September 2, 2025
  • 1 reply
  • 939 views

Hi Community,

I have a use case where:

  • I open a new mashup from within another mashup (e.g., via Navigation).

  • In this new mashup, the user should enter some values.

  • I would like one Text Field to be automatically focused when the mashup loads, so the user can start typing right away without clicking into it.

Has anyone implemented this? Is there a recommended way to achieve auto-focus on a widget (e.g., via binding, service call, or JavaScript) in ThingWorx Mashups?

 

Thanks in advance for your suggestions!

Best answer by CharlesJi

Hi @MA8731174,

 

Due to the nature of Tab Sequence (tabindex), you'll need to put all those with positive integers before the default zero ones to make it work as expected; otherwise, you'll have to correctly set a non-default Tab Sequence (>0) for every widget.

 

However, I don't recommend mixing Tab Sequences with positives (>0) and zeros (=0) on one page.

For your convenience, I suggest upgrading ThingWorx to 9.4 or later and using the FocusOnLoad feature.

https://support.ptc.com/help/thingworx/platform/r9/en/#page/ThingWorx/Help/Mashup_Builder/Widgets/ConfiguringAutoFocus.html

 

Regards,

Charles

1 reply

pshashipreetham
18-Opal
18-Opal
September 2, 2025

Hi @MA8731174 , 

 

Did you try the:

pshashipreetham_0-1756815408079.png

 

Also, if you want the user to move to another Text Field and enter the value in it, with the Tab key, try:

pshashipreetham_1-1756815449519.png


Thanks,

 

MA873117416-PearlAuthor
16-Pearl
September 2, 2025

Thanks for your feedback but i cannot see this property FocusOnLoad in textField widget properties. My thingworx version is 9.3

pshashipreetham
18-Opal
18-Opal
September 2, 2025

Hey,

 

What about the Tab Sequence?

Thanks,