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

132
Views
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
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!