title: Add onclick="return false;" on checkboxes if click on link
body: <p>I'd like to add &quot;onclick=return false;&quot; on my checkboxes after when a click is made on a link.
  And if user click on submit button, then &quot;onclick=return false;&quot; should be removed.</p>
  <p>Is there a way to add onclick=&quot;return false;&quot; on input by document.getElementById?
  I have tried multiple options to implement this... But none works, I am going crazy...</p>
  <p>My code:</p>
  <pre><code>    &lt;form&gt;
      &lt;input type=&quot;checkbox&quot; id=&quot;1&quot; name=&quot;1&quot;&gt;1 option&lt;br&gt;
      &lt;input type=&quot;checkbox&quot; id=&quot;2&quot; name=&quot;2&quot;&gt;2 option&lt;br&gt;
      &lt;a id=&quot;link-next&quot; class=&quot;btn btn-primary&quot; href=&quot;javascript: void(0)&quot;&gt;Next&lt;/a&gt;
      &lt;button id=&quot;button-filter&quot;&gt;Filter&lt;/button&gt;
      &lt;/form&gt;
  </code></pre>