Storing values without writing to database (local storage)

For my app, I have a simple form with a dropdown selection and text input. Both values need to be added to a list of items. After all desired items are added to the list, a button will pass the data to an API. One of the topics in Bubble that I’m very curious about is local storage, since writing these items to the database feels like overkill. The problem I have is that I’ve mostly seen examples with single objects, for lack of a better term. But I’ve seen no examples of local storage featuring an array of items. Anyone have some advice?

Cheers :slight_smile:

I think for this particular case- You can use the Custom state.

Custom state managed over the page (as soon as you refresh the page, value set to default one)

Ankur@ Nocodetalks
Looking for a Bubble Coach? Check out here

Thank you for your quick response! That definitely brings me one step closer. One problem I’m encountering is that I want to save a value of a custom data type. The data type has two fields, one being a description and the other the quantity.
Screenshot from 2022-10-05 09-54-37

I’m not sure about the correct terminology here, but I guess my question is: Can I save the values for these two fields in one custom state? Or do I need to approach it in a different way?

No, you can’t save the “Two fields into one custom state”.

You need to create 2 custom state.

There is one workaround, but that eventually uses the Database. I think that you want to avoid.

One more way is- Save the data as the jsonObject but since Bubble doesn’t have that dataType, you need to create the “text” data type in such a way it stores the jsonArray . I don’t think you need to use that complex thing.

So creation of two custom state works in your case.