drgullin / icheck

Highly customizable checkboxes and radio buttons (jQuery & Zepto)
http://fronteed.com/iCheck
7.39k stars 1.63k forks source link

HTML "value" attribute not working #371

Open cleberpicolo opened 7 years ago

cleberpicolo commented 7 years ago

Friends,

I'm trying to use the attribute "value" for my checkboxes, but after icheck initialization the value disappear.. take a look:

HTML Before: <input type="checkbox" name="perm[]" id="perm-pbd" value="3">

HTML After iCheck initialization: <input type="checkbox" name="perm[]" id="perm-pbd" value="" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; background: rgb(255, 255, 255); border: 0px; opacity: 0;">

My JS: $('input[type=checkbox]').iCheck({ checkboxClass: 'icheckbox_square-blue', radioClass: 'iradio_square-blue', increaseArea: '20%' });

Note that the value disappear I don't know why :-/

Is it normal? Or I'm doing it wrong?

I would like to use serializeArray for get the submit fields but without the value I can't be able to distinguish the checked values.