What is a solution to do select all of the contents of a textfield when the texfield receives focus? Example, if i click on the browser's address bar, the contents of the address bar will selected. |
JQuery to the rescue. Text fields in formspider are < input > elements. You must attach an event to each existing and future input element, by using the (deprecated now) live function.
I modified my main.jsp, and add a reference to a custom js file. inside this file added the following function:
You can further improve the function by using more specific jquery selectors. For example using the styleClass property and select only that class. Akis Hello Akis, many thanks for reply. One question, where can I declare the external-event? Is it: "Miscellaneous > External Methods" section? Tomas
(29 Aug '14, 05:18)
Tomeo
Yes. name:setSelectText.Is the name you use to call the external method using the api_externalmethod.invoke. javascript signature:enableSelectAll(). should match the name of the javascript function.
(29 Aug '14, 11:49)
Vlisidis Akis
|
Hi Ecky, Unfortunately, this API does not exist in the current version of Formspider. I created an enhancement request for this issue in our issue management system for this case. Kind Regards, |
Hi folks, any updates on this? Or temporary trick for selecting content of textfields once it receives a focus? Many thanks, Tomas Hi Tomas, No, nothing I know of. Kind Regards, Yalim
(28 Aug '14, 06:32)
Yalim Gerger ♦♦
What a shame! :(
(28 Aug '14, 06:40)
Tomeo
|