Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

183
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!