I have a user requirement to allow selection of a field value to occur when the user clicks on the textbox widget.
I found this link that refers to two solutions. (See below) The first is the server-level solution (http://www.profoundlogic.com/docs/displ ... t+on+Focus) which would affect all fields on all applications and the second solution refers to "this.focus()" which would be a discrete field sort of solution. This did not work for me either.
Is the server-level solution (http://www.profoundlogic.com/docs/displ ... t+on+Focus) the only way to get the field value selected when the textbox widget gains focus? The goal here is to get the value selected for one field only as opposed to the server-level configuration that affects all fields.
The original post : https://core.profoundlogic.com/forum/vi ... ome#p10997
Textbox value selection when widget gains focus
-
- Profound User
- Posts: 50
- Joined: Fri May 24, 2019 6:26 am
- First Name: Ben
- Last Name: Foster
- Company Name: Manhattan Assurance Company
- Contact:
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Textbox value selection when widget gains focus
Hi BFoster,
I'm not sure that I understand. You say that:
Also, I think the second option should be "this.select()" running in the "onfocus" event. That was probably a typo in the earlier thread.
I'm not sure that I understand. You say that:
- You can't use the "Highlight on Focus" feature because it affects all fields.
- You can't use this.focus() because it affects only one field. But, then you say you want it for one field only.
Also, I think the second option should be "this.select()" running in the "onfocus" event. That was probably a typo in the earlier thread.
-
- Profound User
- Posts: 50
- Joined: Fri May 24, 2019 6:26 am
- First Name: Ben
- Last Name: Foster
- Company Name: Manhattan Assurance Company
- Contact:
Re: Textbox value selection when widget gains focus
The goal here is to get the value selected (getting highlighted in the process) for only one field as opposed to the server-level configuration that affects all fields and all applications.
The user simply wants to start typing over the existing value in the textbox after the widget gains focus. We would like to accomplish this without affecting all textboxes in all applications (via server-level config). We prefer to affect a single field on a particular screen.
The user simply wants to start typing over the existing value in the textbox after the widget gains focus. We would like to accomplish this without affecting all textboxes in all applications (via server-level config). We prefer to affect a single field on a particular screen.
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Textbox value selection when widget gains focus
Set the text box's "onfocus" property to
If that won't work, then please explain better.
Code: Select all
this.select();
Who is online
Users browsing this forum: Bing [Bot] and 3 guests