Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
cbcb8556
Commit
cbcb8556
authored
Nov 03, 2005
by
Dries Buytaert
Browse files
- Patch
#35816
by chx: fixed problem with checkbox handling in the form API.
parent
7bd728ef
Changes
1
Hide whitespace changes
Inline
Side-by-side
includes/form.inc
View file @
cbcb8556
...
...
@@ -235,7 +235,17 @@ function _form_builder($form) {
$ref
=&
$ref
[
$parent
];
}
if
(
!
isset
(
$form
[
'#value'
]))
{
$form
[
'#value'
]
=
(
$posted
&&
isset
(
$edit
))
?
$edit
:
$form
[
'#default_value'
];
if
(
$posted
)
{
if
(
isset
(
$edit
))
{
$form
[
'#value'
]
=
$edit
;
// normal element
}
elseif
(
isset
(
$form
[
'#return_value'
]))
{
$form
[
'#value'
]
=
0
;
// checkbox unchecked
}
}
if
(
!
isset
(
$form
[
'#value'
]))
{
$form
[
'#value'
]
=
$form
[
'#default_value'
];
}
}
if
(
isset
(
$form
[
'#execute'
]))
{
if
(
$_POST
[
$form
[
'#name'
]]
==
$form
[
'#value'
])
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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