title: Javascript - Remove hidden fields or set to empty before form submission
body: <hr>
  
  <p>I want to either remove 2 hidden fields or set them to null in a form before a POST action is performed using onclick event on a checkbox.</p>
  
  <p>This is what I have - </p>
  
  <pre><code>&lt;input type="hidden" id="ci" name="ci" value="2"/&gt;
  &lt;input type="hidden" id="pg" name="pg" value="prev"/&gt;
  
  &lt;form:checkboxes path="choices" items="${lookups}" itemValue="id" itemLabel="label" element="li" **onclick="this.form.submit();"**/&gt;
  </code></pre>
  
  <p>How do I modify my onclick event JS to support this ?</p>
  
  <p>Thanks!</p>