title: How to keep hidden input displaying 1 the whole time
body: <p>Jsfiddle is <a href="http://jsfiddle.net/7sARw/" rel="nofollow">here</a></p>
  
  <p>Please follow steps below in fiddle:</p>
  
  <ul>
  <li><p>Click on the "Open Grid" and select either the "Yes or No" or "True or False" option, you will see the relevant answer buttons appear underneath.</p></li>
  <li><p>Now if you look at the "Number of Answers" row it displays a string stating that "Only 1 Answer" can be chosen. </p></li>
  <li><p>Click on an answer button to turn it on and then click it again to
  turn it off so that no answer button is highlighted green.</p></li>
  <li><p>Click on the "Add Question" button, you realize that it has appended the control from the top into a table. No alert appears stating that you have selected less answers as that you have not highlighted one answer.</p></li>
  </ul>
  
  <p>So the problem is that if you click on one of the answers "True or False" OR "Yes or No" to turn it on and then click on the same answer button again to turn it off, then when you click on the "Add Question" button, it does not perform the validation. </p>
  
  <p>The reason I am assuming it is doing this is because when you click on a answer button for "True", "False", "Yes" or "No", the hidden number of answers text input displays the number 1 as 1 answer is turned on (like the letter buttons), but then when you turn the button off, it displays 0 in the hidden text input as no answers are turned on. </p>
  
  <p>What should happen is that as it is only one answer, if that string appears then the hidden text input should always display <code>1</code>, no matter if there is no answer button is turned on as the user has to choose one answer. I think I have found out that the code below has caused the problem.</p>
  
  <pre><code>function updateAnswer(context, iQuestionIndex, bDisableAppend) {
      var _sCurrQ_Class = 'q_' + iQuestionIndex;
      var _oCurrAnswerContainer = jQuery('#answer_selections .' + _sCurrQ_Class);
      if (!_oCurrAnswerContainer.length) {
          _oCurrAnswerContainer = jQuery(document.createElement('div')).addClass(_sCurrQ_Class);
          !bDisableAppend &amp;&amp; jQuery('#answer_selections').append(_oCurrAnswerContainer);
      }
  
      _oCurrAnswerContainer.html('');
  
      var value, id;
      // loop through all buttons with 'on' status and their info to the current answer container
      $('.answerBtnsOn', context).each(function (i, btn) {
  
          var $btn = $(btn);
          value = btn.value;
          id = $btn.attr('id');
  
          var n = $("input[name='value[" + id + "]']").length;
          var hid = "hidden" + id + n + "value";
          $(btn).attr("data-hid", hid);
  
  
          if (!bDisableAppend) {
              // append those values to the form
              var input = '&lt;input type="checkbox" id="' + hid + '" name="value[' + iQuestionIndex + '][]" value="' + value + '" checked /&gt;&lt;label for="' + hid + '"&gt;' + value + '&lt;/label&gt;';
              _oCurrAnswerContainer.append(input);
          }
      });
  }
  </code></pre>
  
  <p>My question is that in the jsfiddle, can anybody be able to get the fiddle working so that it will display the alert for when the user has not selected an answer after turning on and turning off answer button for "True or False" or "Yes or No"?</p>