Fill text in text box always disappear when back pressed to the other screen, is there any solution?

I have problem when i create essay question, so after i fill my text box, then i back to other screen, text that i fill was disappear. Is there any solution to make my text not disappear when i go to other screen

  1. Use tinyDB: One way to preserve the text entered by the user is to save it locally before navigating away from the screen. Kodular provides components like TinyDB or TinyWebDB for local storage.
  2. Save Text on Screen Exit: Whenever the user navigates away from the screen containing the essay question, use an event handler to save the text entered by the user. You can do this by capturing the text from the text box and storing it in the local storage component.
    When the screen containing the essay question is initialized again, retrieve the saved text from the local storage and populate the text box with it. This ensures that the text entered by the user is restored when they return to the screen.

how you can implement this

Retrieve the saved text from local storage.
Populate the text box with the retrieved text.
When the screen is exited (e.g., when the user navigates away):
Capture the text from the text box.
Save the text to local storage.

1 Like

FYI TinyDB is local storage, TinyWebdB is online storage
Taifun

How to connect tiny db to text box?
I am very newbie for using tiny db

A very good way to learn App Inventor or Kodular is to read the free Inventor’s Manual here in the AI2 free online eBook App Inventor 2 Book: Create Your Own Android Apps … the links are at the bottom of the Web page. The book ‘teaches’ users how to program with AI2 blocks.

There is a free programming course here Course In A Box and the aia files for the projects in the book are here: App Inventor 2 Book: Create Your Own Android Apps

How to do a lot of basic things with App Inventor are described here: How do you...? .

Also do the tutorials Our Tutorials! to learn the basics of App Inventor, then try something and follow the Top 5 Tips: How to learn App Inventor

Taifun

Oh really as the name shows that webdb is online storage so thanks for telling me :joy:

Thanks guys
My problem solve​:pray:

Please provide a screenshot of your relevant blocks for others, which might have the same question in future

Taifun

1 Like

blocks (3)
blocks (2)

1 Like