Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
f076ecf2
Commit
f076ecf2
authored
Jul 29, 2009
by
Ben Bradshaw
Browse files
Pieforms checkbox should only check $global if the form has been
submitted (cherry picked from commit
217e7daa
)
parent
97acfbd6
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/lib/pieforms/pieform/elements/checkbox.php
View file @
f076ecf2
...
...
@@ -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'
]))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment