In function addressfield_field_widget_form(), an "entity key" is set. This is helpful, but it does not seem to work for some cases of use within Inline Entity Form and maybe in some other places where forms are loaded in via AJAX. So, to make it more specific, add the form parents to it and that seems to fix the issue for us:

$element_key = implode('|', array($element['#entity_type'], $element['#bundle'], $element['#field_name'], $element['#language'], $element['#delta'], implode('-', $element['#field_parents'])));

Comments

bojanz’s picture

Status: Active » Closed (duplicate)