Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6627929
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:04:17+00:00 2026-05-25T22:04:17+00:00

So I am generating a form that is different depending on what the user

  • 0

So I am generating a form that is different depending on what the user has chosen. Because of this, I have no idea what is on the page (i.e. select, checkboxes, radio, textarea, text input).

I need a way to just see if a group of radios has been checked or not, essentially to return the value of those radios that are all in the same group. Currently I’m using this jquery each loop:

  $("#formdiv input:radio").each(function(){
  //random validation code here
  }

The problem is that makes me go through every single radio button, when I just want to go through them by how they are grouped.

Additionally, I also need to get checkboxes by their group to get all of the checked values, but I need to know which ones are in the same checkbox group. My current each loop just returns all the checkboxes as individual things:

  $("#formdiv input:checkbox").each(function(){
  //random validation code here
  }

Can anyone help me out?

Sample HTML:

<div class='formatdiv'>
    year: <select name='year' class='required' id='validation3:select'>
        <option value=''></option>
        <option value='1992'>1992</option>
        <option value='1993'>1993</option>
        <option value='1994'>1994</option>
        <option value='1995'>1995</option>
        <option value='1996'>1996</option>
        <option value='1997'>1997</option>
        <option value='1999'>1999</option>
    </select>
</div>
<div class='formatdiv'>
    color: <input type='text' name='color' class='required' id='validation1:text' />
</div>
<div class='formatdiv'>
    used: no <input type='radio' class='optional' id='novalidation4:radio' name='used' value='no' />
    yes <input type='radio' class='optional' id='yesvalidation4:radio' name='used' value='yes' />
</div>
<div class='formatdiv'>
    Checks: Check 1 <input type='checkbox' class='required' name='Checks' value='Check 1' />
        check 2 <input type='checkbox' class='required' name='Checks' value='check 2' />
       check 3 <input type='checkbox' class='required' name='Checks' value='check 3' />
</div>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T22:04:17+00:00Added an answer on May 25, 2026 at 10:04 pm

    As Matt pointed out, the answer can be found here:

    jQuery and radio button groups

    With some simple modification this should also work for checkboxes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a dynamic form that is generating a country list. My problem is
I have a form that I am trying to add a simple select element
A very general question. I am dynamically generating a form that is split into
I am generating a simple form with php. The following code has been reduced
When generating graphs and showing different sets of data it usually a good idea
I have a winform data entry and retrieval program called CaseNotes. This has a
I have a dynamically generated form that I would like to submit using Ajax.
I have a form that users are able to fill in and want to
I have a custom Action Helper that is working fine. It's generating a dynamic
I have a Java Applet that is generating an image. Ultimately, I would like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.