Remembering Collapse states > store array var to db

I have many collapse regions on the page and i want to store their state in the Members table in column m_collapse_state. Probably as an array. I COULD do it with a separate joint table but i want to learn arrays :slight_smile:

Basically i will assume they are open unless Item exists in array then close it.
When collapse/button is pressed, Update array and save in table.

I just can’t figure the update db logic yet.

I created an Array element, added click event to populate it . Got this far. How to save to db?
I tried adding an update server action but cannot choose the Array variable, need to pass that to the action somehow.

any ideas?

thanks

Community Page
Last updated: