How to Save a Text Input by Displaying it on a Label?

I want the user’s name to be displayed on a label. When the label is clicked, a text input and a save button should appear. After the user is done typing in their name and presses the save button, the name should appear on the label. Additionally, after the save button is clicked, I want the text input and save button to disappear. I have images of what I have done so far below. Also, I would like the name to save even if the user goes to a different screen in the app. Can somebody please look at the code and tell me what I need to fix?

image

1 Like

image
This code should help

1 Like

Thanks! But, it did not save if I went to another screen in the app. Is there any way to save the name even if the app gets closed or the user moves to a different screen?

1 Like

The stored variable will save the content even after the app exits. This is correct but it will not automatically show in a label.

If you want the variable to display in the label even when you go to a different screen and come back to the screen that has the label connected to the stored variable then you need to:

In the screen open event connect the stored variable to the label so that whenever you come back to the screen the label will display whatever stored in the variable.

Hope this is clear.

This is what I tried. It still isn’t working.

1 Like

Yeah @muneer is right. The variable is getting stored but it is not getting displayed. It saves it even if you exit the app. To show it in a label when a screen opens use this block -

2 Likes

Ohh okay. Thank you!