Best way to store multi Form values?

Hello, community,

First of all thank you for the great product Wappler. 10 years ago I worked with Dreamweaver but the development is a disaster.

I’m just getting used to Wappler and I already find my way around.

Now to my question:
I would like to create a form that consists of several steps. Each step is a single .php file. So there are 5 steps and 5 files.

Currently I take the values and store them in a “Local Storage” database. At the end the data is written to a MySQL database.

The problem is when I add a field in a file I have to edit the local storage database in each step and edit the variables.

Is there a way that is better? Can I somehow define global variables and use them in each step?

Thanks a lot!

Hi @Eibich, Have you tried the data store component yet?

I find it far easier that local storage, plus you can easily post your form values to your database at the last step. Local storage through Data Store will also pass between pages too.

But the “data store” component has the same behaviour like the “local storage”?

When I edit fields/structure in one file I have also to edit all the other files too?

Or am I wrong?

Yes the data store is based on local storage but gives you easy access to it with its actions.

This is such a usefull information. Just found it in the shopping cart tutorial.

Please optimize your documentation or add more tutorials!

1 Like

Well suggestions and help for better organization are always welcome :slight_smile:

Are you accepting and publishing user made tutorials?

Yes actually all the official documentation at https://docs.wappler.io is generated straight from the forum category #docs after we approve it.

Hi Tobias,

Welcome to Wappler! Have you seen this documentation?