Commit 4f13fbb7 authored by Dries's avatar Dries

- Patch #41023 by wtanaka: custom form elements can't cleanly set a value for themselves.

parent eb412f7c
......@@ -279,8 +279,6 @@ function _form_builder($form_id, $form) {
$form_submitted = $form_submitted || $form['#form_submitted'];
}
}
$ref = $form['#value'];
}
// Allow for elements to expand to multiple elements. Radios, checkboxes and files for instance.
......@@ -294,6 +292,13 @@ function _form_builder($form_id, $form) {
$form['#processed'] = TRUE;
}
// Set the $form_values key that gets passed to validate and submit.
// We call this after #process gets called so that #process has a
// chance to update #value if desired.
if ($form['#input']) {
$ref = $form['#value'];
}
// Recurse through all child elements.
$count = 0;
foreach (element_children($form) as $key) {
......
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