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

135
Vistas
How do I submit value of a "custom" input in a form?

I'm wirting a CRUD application and I ran into this problem today: There's a form where user can set the entry's priority (basically a number from 1 to 3). But instead of an input with type="number" or anything similar, I created a "custom" input. It's a small circle that changes colors when you click it (colors represent numbers from 1 to 3). My question is: how do I submit this value to the form?

The solution I came up with was to use an input with type="hidden" and before the form is submitted, javascript changes the input's "value" attribute to match the number selected in the "custom" input. This seems to be working but according to MDN type="hidden" inputs are used for "data that cannot be seen or modified by users when a form is submitted", so I'm guessing this is not a typical solution to this kind of problem. Is there some kind of agreed upon method for this problmes like this?

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