It would be much easier to add new fields, if we could add new fields somehow to the following array:
array('name_line', 'first_name', 'last_name', 'organisation_name', 'country', 'administrative_area', 'sub_administrative_area', 'locality', 'dependent_locality', 'postal_code', 'thoroughfare', 'premise', 'sub_premise')
This is used in the functions _addressfield_process_format_form and _addressfield_render_address.
I stumbled upon this when adding fields in the way like it is done in the modules addressfield_title or addressfield_phone.
It would be perfect, if there were a way to add elements to this array via a hook.
Comments
Comment #1
bojanz CreditAttribution: bojanz commentedAddressfield data is not meant to be extended. Instead, place fields on the parent entity (for example, commerce_customer_profile in the Commerce use case).