I want to import data from a external source and so am writing a module that creates content by populating the fields of node bundles in code. I followed this guide which is great.
So I am working on adding lists of properties (flats and houses) that belong to estates. I am using an address field to store the address and found this comment on the address field module page that tells me that the address field is an array and so I can access each element and set it in turn.
But what are the address field element and how do I get a list of them? Can they be anything I want? Does the create content form create the array when the form is submitted and therefore the form labels are just a guide or do I have to match them in my code? For example, a UK address has two textboxes for address (address1 and address2) that do not match any of the element names in the module documentation.