Been bashing my head against this and other problems in SS for a while now, thought i'd ask the wider community.
In the linked code, (unnecessary .. i think.. bits excluded), the dropdown box gets the list of offices just fine, but it won't update when I click save. It says it all saves ok, but when i navigate away and back again, nothing has changed. What am I missing?
Investigating the generated code it seems like the <input> tags are fine. I'm stumped.
Even better, you can use TypeDropdown instead of DropdownField. This means you won't have to do a DataObject::get('Office') to return all the instances of the Office class, then transform that into an array map for the DropdownField source.
new TypeDropdown('MyOfficeID', 'Office', 'Office');