Keep checkbox checked even after refresh or reload of the website.

Hello. First off, this is my first time to use this platform or any other platform at least in web design.

So, here’s the problem. I have coded a checkbox so, if checked, will make a few elements show up. However, whenever the site is refreshed or reopened, the check on the checkbox disappears, along with the elements that it showed up.

My question is how can I make it so that regardless of how many times I refresh the page, the checkbox will remain checked?

Here’s the code I’m currently using, the one that allows a few elements to appear from checking the checkbox.

export function checkbox5_click(event) {
 // This function was added from the Properties & Events panel. To learn more, visit http://wix.to/UcBnC-4
 // Add your code for this event here:  
 if ($w('#checkbox5').checked) {
            $w('#image36').show()
            $w('#text75').show()
            $w('#text76').show()
            $w('#text77').show()
            $w('#button38').show()
            $w('#vectorImage1').show()
        } else {
            $w('#image36').hide()
            $w('#text75').hide()
            $w('#text76').hide()
            $w('#text77').hide()
            $w('#button38').hide()
            $w('#vectorImage1').hide()
        } 
    }

This is the code I tried to use to make my desired output happen (the one that doesn’t work for me).

export function checkbox5_click(event) {
 // This function was added from the Properties & Events panel. To learn more, visit http://wix.to/UcBnC-4
 // Add your code for this event here:  
   $w.onReady(function () { 
      $w('#checkbox5').onChange( (event, $w) => {   
 if ($w('#checkbox5').checked) {
            $w('#image36').show()
            $w('#text75').show()
            $w('#text76').show()
            $w('#text77').show()
            $w('#button38').show()
            $w('#vectorImage1').show()
        } else {
            $w('#image36').hide()
            $w('#text75').hide()
            $w('#text76').hide()
            $w('#text77').hide()
            $w('#button38').hide()
            $w('#vectorImage1').hide()
        } 
    }

So, am I doing something wrong with the code I’m trying to do, or is there another line of code I’m supposed to be using?

All you need, you will find here…

Checkpoint —> “Wix-Storage” !

https://www.wix.com/velo/reference/wix-storage

Another way is to create a collection where will be stored a memory of user’s choice to create a dataset and to connect it to the checkbox and to query to this collection everytime someone is open your page to see if this user was here before. And if so, to show checkbox as checked or not. Depending of past user’s actions.
Here is the fast made example for you with the code and screenshots.

Yes, of course you can also use a DATABASE as MEMORY.

On the first picture of your link at the bottom, how do you get that series of text for the number 1 under the users?

I’m sorry it doesn’t seem to work for me. I do think it has something to do with my one missing field in the dataset.

Here you will find an example, where you can see, how the MEMORY of checkboxes works.

Choose some values in one of the given checkbox, or two, or more and then refresh the page.

Did the checkbox lost the values???

https://www.media-junkie.com/pflegeservice

In the example, you see a checkbox-group (not separated checkboxes)!