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 7561123
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T13:05:18+00:00 2026-05-30T13:05:18+00:00

I have a set of radio button groups. How can I get which is

  • 0

I have a set of radio button groups. How can I get which is checked yes or now for each group and add them to array?

Here is what I came up so far:

My jquery code:

<script type="text/javascript">
    $(function () {

        $("#getinfo").click(function () {

            $("input[name*=radio-choice-1]:checked").each(function () {
                 alert($(this).val());
            });

        });   

    });       

</script>

and radio buttons

<fieldset data-role="controlgroup" data-type="horizontal" data-role="fieldcontain">        
<input type="radio" name="radio-choice-1" id="radio-choice-1" value="choice-1" />
<label for="radio-choice-1">Yes</label>
<input type="radio" name="radio-choice-1" id="radio-choice-2" value="choice-2" />
<label for="radio-choice-2">No</label>
</fieldset>

<fieldset data-role="controlgroup" data-type="horizontal" data-role="fieldcontain">        
<input type="radio" name="radio-choice-3" id="radio-choice-3" value="choice-3" />
<label for="radio-choice-3">Yes</label>
<input type="radio" name="radio-choice-3" id="radio-choice-4" value="choice-4" />
<label for="radio-choice-4">No</label>
</fieldset>

<fieldset data-role="controlgroup" data-type="horizontal" data-role="fieldcontain">        
<input type="radio" name="radio-choice-5" id="radio-choice-5" value="choice-5"  />
<label for="radio-choice-5">Yes</label>
<input type="radio" name="radio-choice-5" id="radio-choice-6" value="choice-6" />
<label for="radio-choice-6">No</label>
</fieldset>

<fieldset data-role="controlgroup" data-type="horizontal" data-role="fieldcontain">        
<input type="radio" name="radio-choice-7" id="radio-choice-7" value="choice-7" />
<label for="radio-choice-7">Yes</label>
<input type="radio" name="radio-choice-7" id="radio-choice-8" value="choice-8" />
<label for="radio-choice-8">No</label>
</fieldset>

<a href="#" id="getinfo">getinfo</a>
  • 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-30T13:05:19+00:00Added an answer on May 30, 2026 at 1:05 pm

    You’re looking for the checked radio button with a name containing the text radio-choice-1 – that’s only ever going to be one radio button, because it’s the full name. I think what you actually wanted is the checked radio buttons with a name containing the text radio-button-, so just remove the 1 from your selector and it should work.

    Working DEMO

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

Sidebar

Related Questions

I have this group of radio buttons in which each of individual button has
I have the next radio button group: $enabled = $this->createElement('radio', 'enabled') ->setLabel('Enabled') ->setMultiOptions(array('1'=>'yes', '0'=>'no'))
I have group of radio buttons, each group ranges from 5 - 27 radiobuttons.
In a set of radio buttons of the same group, only one can be
I have a set of radio buttons which have unique name and id but
I have a group of radio buttons, and have styled them so that they
I'm having a set of 9 radio Buttons (a group of 3 each),user has
I have 2 radio button groups. The two buttons are radioGroupLoanType and radioGroupLoanType. The
I have two groups of radio buttons set up in one form: <li>1&nbsp;<Input type
I am trying to add a new radio button to an existing group box

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.