Convert checkbox values to boolean (It is convenient when you have save checked values database)
function convert_checkbox_values_to_boolean(optional_container = ''){
$(optional_container+' input[type=checkbox]').each(function () {
if($(this).is(':checked')){
$(this).val(1);
} else {
$(this).val(0);
}
});
}