Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
In 8.3 and prior, we've been using the Expression widget to force focus to a textbox. We do this on mashups that are driven by keyboard wedge barcode scanners. We need to force focus back to the textbox after barcode is scanned, or after a user scans a barcode and then presses some buttons.
I just checked the latest release, 8.4.4, and I still see no way to force focus to a textbox. Is anyone else in this same situation? Does anyone have any suggestions on how to force focus to a widget in 8.4 based on other mashup events?
Hi bmehringer,
I have the same problem here, i need to force the focus to a text-box because its more efficient for the bar-codes scanners. But i still didn't know how to resolve this.
My answer it's only to communicate to you that the expression widgets were delete, but they put a expression function. It's situated on the lower right of the screen, where are the data properties. There are the "Functions", there you can create a expression.
If this can resolve your issue, you can help me with the script to resolve my issue?
Thanks.
Eng. David Zarzoza
I've tested with the Expression Functions in the lower right in 8.4 and they don't support jQuery or keywords like "document", so I'm still unable to force focus in 8.4.
If you are needing script to help force focus in 8.3, then I can help. If you want to force focus, you can put the below jQuery in an Expression widget. In the below example, "textbox-4" will be the ID of the Text Box widget you want to have focus when the Expression is evaluated. You can also use "select()" to highlight the text, or "val("<your value>")" to automatically set the value.
$('[id*=textbox-4]').find("input").focus()
Has there been any update in how to accomplish this in 8.4 and above?
I have the same use case described above and still unable to solve. Thanks!
Hi everyone.
Some improvements are being made to the functions in the 9.0 release targeted for June. However, it's recommended that you post your idea on the ThingWorx Ideas page for possible consideration in a future release. This will allow others to vote for it, which will increase awareness of the need.
Regards.
--Sharon
Hi @bmehringer.
If you feel your question has been answered, please mark the previous reply as the Accepted Solution for the benefit of others on the community.
Regards.
--Sharon