Commit cd349f0f authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Fix for javascript checkbox

parent 72b2651d
......@@ -51,4 +51,14 @@ function form_render_checkbox($element, Form $form) {
. '>';
}
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';
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