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

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