title: How to submit all checkbox fields in the form?
body: <p>I have my table with the list of checkboxes. If checkbox is checked value is set to 0, if it's unchecked then value is -1. My current code only submit check boxes if they are checked. I want to submit all check boxes in my form every time I hit save button. Is there any way I can do that? Here is my code:</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;input type="checkbox" name="user" value="~(user_ID)" class="chkBlock" /&gt;
  </code></pre>
  
  <p>JQuery:</p>
  
  <pre><code>//This code switch value based on if check box is checked or not
  $j('.chkBlock').click(function(){
       $j(this).val(this.checked ? 0:-1);
  });
  </code></pre>
  
  <p>and this code set check box status based on the values from DB:</p>
  
  <pre><code>$j( document ).ready(function() {
      $j('input.chkBlock[value="0"]').prop("checked", true);
      $j('input.chkBlock[value="-1"]').prop("checked", false);
      $j('input.chkBlock[value=""]').prop("checked", false);
  });
  </code></pre>
  
  <p>My current code only submit value if it's checked. </p>