Reset/Delete an input when touching it

Do you know a way of resetting/deleting an input once you touch it? This is a question more for mobile experts: Loom | Free Screen & Video Recording Software | Loom

What do you mean by once you touch it? Like once the user clicks onto it or once the user has finished adding a value?

Yeah so basically a click, but since we are talking mobile I refer to it as touching it. Once there is a value in there and the user wants to go back, touches it and it resets/deletes so he can add a new value into that same input.

You can usedocument.getElementById('myInput') to get a reference to the input element and add an event listener to the input using input.addEventListener('focus', function() { ... }).
The 'focus' event is triggered when the input is tapped or receives focus and inside the event listener function, you can set input.value = ''; to clear the input’s value when it is tapped.
This is the generic way of doing it.

@djan you don’t need to uses JavaScript as Bubble has built these into the platform. There is dynamic expression for input is focused and workflow action triggers for when input value is changed as well as workflow action for reset an input. Might be easier to use the platform built in functions rather than dealing with JavaScript.