Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

108
Vistas
Keep checkboxes/radio buttons with same name checked after page refresh

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).

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Probably store wheter they are checked in a local/session storage. Then when refreshed read the storage to check the box again.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda