I'm creating a Bootstrap website in which I have a page with multiple checkbox and radio button groups. I'm using Bootstrap's built in functionality to create groups of radio buttons, meaning that through the use of the same "name" attribute (but different "value" attributes) I'm able to switch selection between radio buttons. I'm also giving the same "name" attribute to the checkboxes I want to group (and different "value" attributes to differentiate them), in order to be able to easily create Javascript and/or PHP based on the current selection.
I found an article - http://www.marcorpsa.com/ee/t2641.html - and from what I can see, the script on the article only works if the value of the "name" attribute of the checkboxes/radio buttons is different from checkbox/button to checkbox/button (which can't happen in case I want to group them easily). To be clear, this script works perfectly if I give a unique "name" attribute to each of my checkboxes/radio buttons.
I also found some articles here (on Stack Overflow), but unfortunately I couldn't find anything that worked on my situation.
My question is: how can I modify the script on the article in order to keep all the checkboxes/buttons checked after the page reloads? Or do you have another solution?
Let me know if you need more information (like screenshots, code or anything else).
Probably store wheter they are checked in a local/session storage. Then when refreshed read the storage to check the box again.