How to make button text editable by user

Hi, I want to use the long press button function to allow users to change the text of buttons. How do I do that?

Hi, @donavan.naidoofnw! :wave:

When the user long-presses the button, a text-input with a small submit button would appear.
When he/she writes into the text-input, and hits “submit” button, the main button’s text would change through these blocks -

image

Hope I helped you! :smile:
Good Luck! :+1:

Thanks! :blush:

Hi Kartik, thanks for this.

When I long press it comes up as undefined.

Is you text input initially empty? undefined is the initial value when you add a new TextInput component.

You can use an IF block to handle these cases.

1 Like

Here are 3 methods by which you can change the text of a button

https://x.thunkable.com/copy/51b7a00685a4950f0f735dd842d51d2a

3 Likes

Thank you to everyone for such quick replies. I realised i must have a text input box or someplace to get the text to change the button text. I will try to apply all of your suggestions. Thank you so much once again. Very helpful.

2 Likes

Hi, @donavan.naidoofnw! :wave:

Keep us posted, and don’t forget to mark the appropriate post as solution :white_check_mark: ! :+1:

Thanks! :blush:

1 Like