Hello all,
I searched and couldn’t find how to do this.
I want the same behaviour as bubble does it, say with the interface when clicking on a text property field.
So, simply said:
I enter a page where I have an input field. The input field already contains a value picked up from the database or entered manually previously
I click in that field. The field content is selected (highlighted)
I type another value and this value automatically replaces the current content
Example as it is working in the bubble.io interface
Step 1. - Field with current content
Step 2. Click once and the field content is selected
Step 3. Type in new content - current content is replaced
How do I replicate that behaviour in my App when using an input field?
Right now, when I click in the input field that already contains a value, the cursor is placed where I clicked. In order to replace that value, I have to delete (backspace or delete) the content that is there in order to enter a new content. Annoying… so my users say.
The first way (input A) uses ‘when a hidden element is visible’ as the condition to run the Javascript.
The second way (input B) is cleaner (and doesn’t require a hidden element), but it might not be officially supported by Bubble - you can’t select ‘when an input is focussed’ as an option in an only when condition for a workflow, you have to copy and paste it from elsewhere… so it might not be a reliable long-term solution?.. (maybe safer to use the first option).
Thank for this reply Adam.
I am quite a newbie… where can I see the JavaScript code? How do I implement this JavaScript code in my App?
(Note: I at least know what JavaScript is…