Commit f076ecf2 authored by Ben Bradshaw's avatar Ben Bradshaw
Browse files

Pieforms checkbox should only check $global if the form has been

submitted
(cherry picked from commit 217e7daa)
parent 97acfbd6
......@@ -37,7 +37,7 @@ function pieform_element_checkbox(Pieform $form, $element) {/*{{{*/
$checked = true;
}
$global = ($form->get_property('method') == 'get') ? $_GET : $_POST;
if (isset($global[$element['name']])) {
if ($form->is_submitted() && isset($global[$element['name']])) {
$checked = true;
}
else if (!$form->is_submitted() && !empty($element['defaultvalue'])) {
......
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