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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T01:20:30+00:00 2026-05-24T01:20:30+00:00

I have a poll with a couple a questions. Here is html code <form

  • 0

I have a poll with a couple a questions. Here is html code

<form id="pool">
 <div class="questions>
  <input type="radio" name="sex">Male
  <input type="radio" name="sex">Female
 </div>

 <div class="questions>
  <input type="radio" name="hair">Brown
  <input type="radio" name="hair">Blonde
 </div>

 .... a lot of qestions div's
</form>

What to do so after the form is submitted to be sure that there is a checked radio button in all div`s ?

  • 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-24T01:20:31+00:00Added an answer on May 24, 2026 at 1:20 am

    If you know how many groups you have you can just do:

    if($('#pool input:radio:checked').length < numGroups){
        // At least one group isn't checked
    }
    

    Otherwise you need to count the number of groups first. I can’t think of any way to do this better then:

    var rgroups = [];
    $('#pool input:radio').each(function(index, el){
            var i;
            for(i = 0; i < rgroups.length; i++)
                if(rgroups[i] == $(el).attr('name'))
                    return true;
            rgroups.push($(el).attr('name'));
        }
    );
    rgroups = rgroups.length;
    
    if($('#pool input:radio:checked').length < rgroups)
        alert('You must fill in all the fields.');
    else
        alert('Thanks!');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to setup a simple Thread/Poll table mapping. Here is what I have: Threads
I have a standard form on poll.php: <form method=POST action=createpoll.php> ..blah... </form> Is there
In my model I have: class Poll(models.Model): topic = models.CharField(max_length=200) tags = models.ManyToManyField(Tag) I'm
I have a poll that has five 1-5 star ratings and I need to
I'm thinking about how limiting it is for AJAX apps to have to poll
Say I have a database called Poll and have these two table structures. poll
I have an application that needs to poll a webservice to see if the
I have two threads, one needs to poll a bunch of separate static resources
I have an app that, while running, needs to poll its own memory usage.
Have you guys had any experiences (positive or negative) by placing your source code/solution

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.