Closed (won't fix)
Project:
Address Field
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
17 Jan 2013 at 08:44 UTC
Updated:
15 Dec 2014 at 16:47 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
rogical commentedSimple enhancement solve this.
Comment #2
rogical commentedComment #3
rszrama commentedI 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.
Comment #4
bojanz commented