Commit c0a43c50 authored by Dries's avatar Dries
Browse files

- Patch #40765 by chx: fixed problem with form types.

parent dd2fdd12
...@@ -539,7 +539,15 @@ function expand_date($element) { ...@@ -539,7 +539,15 @@ function expand_date($element) {
$options = drupal_map_assoc(range(1900, 2050)); $options = drupal_map_assoc(range(1900, 2050));
break; break;
} }
$element[$type] = array('#type' => 'select', '#value' => $element['#value'][$type], '#attributes' => $element['#attributes'], '#parents' => $element['#parents'], '#options' => $options, '#tree' => TRUE); $parents = $element['#parents'];
$parents[] = $type;
$element[$type] = array(
'#type' => 'select',
'#value' => $element['#value'][$type],
'#attributes' => $element['#attributes'],
'#parents' => $parents,
'#options' => $options,
);
} }
return $element; return $element;
......
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