title: Multiple Radio Button Validation
body: <p>I am creating a web form that contains a table housing radio buttons as options for the user to pick. I have grouped the rows by ID and wish the page to not allow users to continue unless each row has a valid selection. I am having trouble with this as the form posts as long as one group has a selection and doesn't assess all the groups. I have included 2 groups for testing purposes, but my webform will actually contain more. I am very new to C# and JavaScript, but I know that I have an issue that both are using isChecked, but I am sure this is not the only issue. I have used this as a guide <a href="https://www.codemahal.com/video/radio-buttons-and-form-validation/" rel="nofollow noreferrer">https://www.codemahal.com/video/radio-buttons-and-form-validation/</a></p>
  
  <p>Here is my code</p>
  
  <pre><code> &lt;script type="text/javascript"&gt;
       function isChecked() {
           var checkedITEx = document.getElementById('IT-Ex').checked;
           var checkedITVG = document.getElementById('IT-VG').checked;
           var checkedITGd = document.getElementById('IT-Gd').checked;
           var checkedITAve = document.getElementById('IT-Ave').checked;
           var checkedITPoor = document.getElementById('IT-Poor').checked;
  
           if (checkedITEx == false &amp;&amp; checkedITVG == false &amp;&amp; checkedITGd == false &amp;&amp; checkedITAve == false &amp;&amp; checkedITPoor == false) {
               alert('You need to select a rating for Independent Thinking');
               return false;
           }
           else {
               return true;
           }
       }
       function isChecked() {
           var checkedResEx = document.getElementById('Res-Ex').checked;
           var checkedResVG = document.getElementById('Res-VG').checked;
           var checkedResGd = document.getElementById('Res-Gd').checked;
           var checkedResAve = document.getElementById('Res-Ave').checked;
           var checkedResPoor = document.getElementById('Res-Poor').checked;
  
           if (checkedResEx == false &amp;&amp; checkedResVG == false &amp;&amp; checkedResGd == false &amp;&amp; checkedResAve == false &amp;&amp; checkedResPoor == false) {
               alert('You need to select a rating for Resiliance');
               return false;
           }
           else {
               return true;
           }
       }
   &lt;/script&gt;    
  &lt;/head&gt;
  &lt;body&gt;
      &lt;form id="form1" runat="server" action="Default.aspx" method="get" onsubmit="return isChecked();"&gt;
          &lt;table&gt;
              &lt;tr&gt;
              &lt;td class="auto-style1"&gt;&lt;/td&gt;
              &lt;td class="auto-style2"&gt;Excellent&lt;/td&gt;
              &lt;td class="auto-style2"&gt;Very Good&lt;/td&gt;
              &lt;td class="auto-style2"&gt;Good&lt;/td&gt;
              &lt;td class="auto-style2"&gt;Average&lt;/td&gt;
              &lt;td class="auto-style2"&gt;Poor&lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
              &lt;td class="auto-style1"&gt;Independent Thinking&lt;/td&gt;
              &lt;td class="auto-style2"&gt;&lt;input type="radio" name="IndThink" value ="Independent Thinking - Excellent" id="IT-Ex"/&gt;&lt;/td&gt;
              &lt;td class="auto-style2"&gt;&lt;input type="radio" name="IndThink" value ="Independent Thinking - Very Good" id="IT-VG"/&gt;&lt;/td&gt;
              &lt;td class="auto-style2"&gt;&lt;input type="radio" name="IndThink" value ="Independent Thinking - Good" id="IT-Gd"/&gt;&lt;/td&gt;
              &lt;td class="auto-style2"&gt;&lt;input type="radio" name="IndThink" value ="Independent Thinking - Average" id="IT-Ave"/&gt;&lt;/td&gt;
              &lt;td class="auto-style2"&gt;&lt;input type="radio" name="IndThink" value ="Independent Thinking - Poor" id="IT-Poor"/&gt;&lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
              &lt;td class="auto-style1"&gt;Resiliance&lt;/td&gt;
              &lt;td class="auto-style2"&gt;&lt;input type="radio" name="Res" value ="Resiliance - Excellent" id="Res-Ex"/&gt;&lt;/td&gt;
              &lt;td class="auto-style2"&gt;&lt;input type="radio" name="Res" value ="Resiliance - Very Good" id="Res-VG"/&gt;&lt;/td&gt;
              &lt;td class="auto-style2"&gt;&lt;input type="radio" name="Res" value ="Resiliance - Good" id="Res-Gd"/&gt;&lt;/td&gt;
              &lt;td class="auto-style2"&gt;&lt;input type="radio" name="Res" value ="Resiliance - Average" id="Res-Ave"/&gt;&lt;/td&gt;
              &lt;td class="auto-style2"&gt;&lt;input type="radio" name="Res" value ="Resiliance - Poor" id="Res-Poor"/&gt;&lt;/td&gt;
              &lt;/tr&gt;
          &lt;/table&gt;  
          &lt;input type="submit" value="Submit"/&gt;
      &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>