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

185
Vistas
Javascript Validation(not focusable)

I am using HTML5 to validate my code but due to Javascript it is not submiting. It is showing the error Invalid form control with name="..." is not focusable for the feilds which are not selected. Since I have use Javascript for dynamic switching. Heres the code

function prodType(value) {
  document
    .querySelectorAll(".fieldbox")
    .forEach((node) => (node.style.display = "none"));
    $("input").prop('required',true);
   
  document.getElementById(map[value]).style.display = "block";
 
}

I have tried the few solutions which were discussed before but it is not working.

function prodType(value) {
  document
    .querySelectorAll(".fieldbox")
    .forEach((node) => (node.style.display = "none"));
    $("input").prop('required',true);
   
  document.getElementById(map[value]).style.display = "block";
  document.getElementById('id here').removeAttribute = "required";
 
}

id here for the id for the for which it is showing error

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