Skip to main content
15-Moonstone
October 7, 2020
Solved

Set focus on textbox

  • October 7, 2020
  • 1 reply
  • 2824 views

Hi,

is it possible in ThingWorx 8.5.x and 9 to force focus on a specific element (like a textbox) in a mashup during runtime? I've seen solutions in older posts with jQuery which are no longer working.

Is there any way to achive this in newer Thingworx versions?

Best answer by Ciprian-Traian


Hello @DanZ,

 

You need to develop a custom widget where you place manually the focus to an element.

You can follow example at developer portal or at the Help Center page section Creating Customized ThingWorx Widgets

1 reply

Community Manager
October 8, 2020

Hi @DanZ.

 

Can you point out the older posts that you're referring to? This will help us gain a better understanding of your requirement.  

 

Regards.

 

--Sharon

DanZ15-MoonstoneAuthor
15-Moonstone
October 9, 2020

Certainly. The accepted solution in this case isn't working anymore: https://community.ptc.com/t5/ThingWorx-Developers/Force-focus-to-a-textbox/td-p/501391

I simply want to set focus to an element (like a textbox) after an event (i.e. ButtonClicked) is triggered.

 

EDIT: There are even cases where it is mentioned that jQuery isn't working anymore for this use case.

https://www.ptc.com/en/support/article/CS314721

https://www.ptc.com/en/support/article/CS304107

 

Is there any alternative?

5-Regular Member
October 12, 2020


Hello @DanZ,

 

You need to develop a custom widget where you place manually the focus to an element.

You can follow example at developer portal or at the Help Center page section Creating Customized ThingWorx Widgets