Commit 6ad02345 authored by drumm's avatar drumm
Browse files

#56143 by chx: Non multiple form elements also set to array

parent 4797222c
......@@ -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";
}
......
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