Commit c1a9f593 authored by Nigel McNie's avatar Nigel McNie Committed by Nigel McNie
Browse files

Possible proper fix for checkboxes always being 'on', that makes sure the

value isn't sent if the checkbox isn't checked.
parent d2bb358c
......@@ -55,7 +55,9 @@ function form_get_value_js_checkbox($element, Form $form) {
$formname = $form->get_name();
$name = $element['name'];
return <<<EOF
data['{$name}'] = document.forms['$formname'].elements['$name'].checked ? 'on' : 'off';
if (document.forms['$formname'].elements['$name'].checked) {
data['$name'] = 'on';
}
EOF;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment