When there are no regions in the database getRegionField returns a new RegionCode TextField which causes an error as we end up with two RegionCode fields, we remove them both and then only readd the one we want directly after the Country field rather than the end of the form.
When there are no regions in the database getRegionField returns a new RegionCode TextField which causes an error as we end up with two RegionCode fields, we remove them both and then only readd the one we want directly after the Country field rather than the end of the form.