#56143 by chx: Non multiple form elements also set to array
parent
4797222c13
commit
6ad023451a
|
@ -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";
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue