Commit dc6db21c authored by bojanz's avatar bojanz
Browse files

Issue #2848747 by bojanz, dww, Jodan: Address form element doesn't work on...

Issue #2848747 by bojanz, dww, Jodan: Address form element doesn't work on forms without #tree => TRUE
parent bca416ec
......@@ -55,6 +55,7 @@ class Address extends FormElement {
'#input' => TRUE,
'#multiple' => FALSE,
'#default_value' => NULL,
'#process' => [
[$class, 'processAddress'],
[$class, 'processGroup'],
......@@ -146,12 +147,13 @@ class Address extends FormElement {
$value['country_code'] = key($country_list);
}
$element += [
$element = [
'#tree' => TRUE,
'#prefix' => '<div id="' . $wrapper_id . '">',
'#suffix' => '</div>',
// Pass the id along to other methods.
'#wrapper_id' => $wrapper_id,
];
] + $element;
$element['langcode'] = [
'#type' => 'hidden',
'#value' => $value['langcode'],
......
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