Posted by rogical on January 17, 2013 at 8:44am
2 followers
| Project: | Address Field |
| Version: | 7.x-1.x-dev |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
I've put an address field in field collection, the state section is missing after country changed.
Comments
#1
Simple enhancement solve this.
#2
#3
I can't reproduce this issue. The state list updates just fine when using a multi-value address field inside a Field Collection (or just attached to a Node for that matter).
That said, it's still invalid HTML to have two elements on the page with the same ID. If you're truly experiencing collision issues on refresh, even this change would seem to be insufficient, because if you have two address fields on the form they'd presumably still have IDs that collided (two addressfield-wrapper-0, ...-1, etc.).
So the real question is - how do we ensure a unique wrapper ID? I suppose we can include both the instance name and delta value - that should get us most of the way there, though it's still feasible to have duplicates (i.e. if you had a multi-value field collection w/ an address field in it on the form).
Additionally, this patch should make sure field related data can be found in the $context array. It's not guaranteed to be there, because the same form building function can be used outside of the Field API.