<input type="checkbox" name="checkbox" value="" item_cat="list">
<input type="checkbox" name="checkbox" value="" item_cat="food">
<input type="checkbox" name="checkbox" value="" item_cat="cars">
<input type="//hidden" name="checkbox-list" value="">
<script type="text/javascript" src="//code.jquery.com/jquery-1.9.1.js"></script>
<script>
$(document).on('click', 'input[name="checkbox"]', function(){
$('input[name="checkbox-list"]').val(
$('input[name="checkbox"]:checked')
.map(function(){
return this.getAttribute('item_cat')
})
.toArray()
.join(',')
)
});
</script>