Closed (works as designed)
Project:
Address Field
Version:
7.x-1.0-beta2
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
15 Apr 2012 at 02:41 UTC
Updated:
3 May 2013 at 21:52 UTC
I'm using addressfield on the user profile page without any problems, great module!!!
On the registration I'm requiring the country to be selected, city, state and zip are optional.
When I looked into the $form_state array to get to the country value I found this array:
Array
(
[user|user|field_address|und|0] => Array
(
[thoroughfare] =>
[premise] =>
[locality] => my city
[administrative_area] => CA
[postal_code] => 99999
[country] => US
)
)
[user|user|field_address|und|0] doesn't look right to me. Is this a bug?
Thanks
UWE
Comments
Comment #1
rszrama commentedNope, this is correct. What you're seeing is the element_key we use to identify an addressfield element on a form. This ensures it works for some entity reference situations across AJAX refreshes and what not. You'd see the actual input broken out in the $form_state['values'] array like you'd expect.