bantikyan / icheck-bootstrap

Pure css checkboxes and radio buttons for Twitter Bootstrap.
https://bantikyan.github.io/icheck-bootstrap/
MIT License
140 stars 35 forks source link

Sending value problem #9

Open seritpt opened 4 years ago

seritpt commented 4 years ago

What I have is:

<div class="icheck-primary">
     <input type="checkbox" value="1" id="save_client" name="save_client" checked>
     <label for="save_client">Save Client</label>
</div>

But I only want to send the value if is checked. If uncheck, send's the value 1 and I only need to send if checked. In code inspect I can verify that nothing change if I check or uncheck doesn't remove the attribute checked. Can you help me please? And very nice work by the way ;-) Thanks in advance :-)

bantikyan commented 4 years ago

Hi @seritpt I think the problem you describe is not related to icheck-bootstrap, you will get the same issue when dealing with regular checkboxes. Can you verify that?