Empty checkboxes cant be stored

We cant uncheck everything in General history of demographics and save it correctly, i think this process is not working in latest openemr also. Let me know if any developers has the solution ,In my view the condition in history_save.php is the problem
if (isset($POST["form$field_id"])) {

can anyone help that what is the reason of the above condition

hi @CoderEMR, thanks for the bug report, you’re close, the check boxes present a special condition so you’d need something like

    if (isset($_POST["form_$field_id"])) {
        $newdata[$field_id] = get_layout_form_value($frow);
    } else if ($field_id == 'usertext11') {
        $newdata[$field_id] = get_layout_form_value($frow);
    }

Thanks for this, Now it is working perfectly