Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
6ad02345
Commit
6ad02345
authored
Mar 29, 2006
by
drumm
Browse files
#56143
by chx: Non multiple form elements also set to array
parent
4797222c
Changes
1
Hide whitespace changes
Inline
Side-by-side
includes/form.inc
View file @
6ad02345
...
...
@@ -339,7 +339,12 @@ function form_builder($form_id, $form) {
$form
[
'#value'
]
=
!
empty
(
$edit
)
?
$form
[
'#return_value'
]
:
0
;
break
;
case
'select'
:
$form
[
'#value'
]
=
isset
(
$edit
)
?
$edit
:
array
();
if
(
isset
(
$edit
))
{
$form
[
'#value'
]
=
$edit
;
}
elseif
(
isset
(
$form
[
'#multiple'
])
&&
$form
[
'#multiple'
])
{
$form
[
'#value'
]
=
array
();
}
break
;
case
'textfield'
:
if
(
isset
(
$edit
))
{
...
...
@@ -874,7 +879,7 @@ function theme_button($element) {
else
{
$element
[
'#attributes'
][
'class'
]
=
'form-'
.
$element
[
'#button_type'
];
}
return
'<input type="submit" '
.
(
empty
(
$element
[
'#name'
])
?
''
:
'name="'
.
$element
[
'#name'
]
.
'" '
)
.
'value="'
.
check_plain
(
$element
[
'#value'
])
.
'" '
.
drupal_attributes
(
$element
[
'#attributes'
])
.
" />
\n
"
;
}
...
...
Write
Preview
Supports
Markdown
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