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

128
Vistas
Catch and edit form data before form will be submitted by submit button

I need to get checkbox values data before form will be submitted using vanilla JS or jQuery, modify and continue submit. For example:

<form name="myForm" method="post">

  <input type="checkbox" name="cbxs" value="cb_1">
  <input type="checkbox" name="cbxs" value="cb_2">

  <button type="submit">Submit</button>
</form>

I need to check if one single checkbox is checked to wrap it with array like cbxs=['cb_1'], if checked 2+ - do nothing. In this case backend is always being received array of checkboxes like cbxs=['cb_1'] or cbxs=['cb_1', 'cb_2'].

about 4 years ago · Juan Pablo Isaza
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