I would like to change the order of fields when a customer adds an address or edits an existing one in the address book.
Eg: I would like the zip-code field to be ordered before the city field.
Previously I had already handled this by copying the contents from magento-customer/view/frontend/templates/form/edit.phtml
and pasting them into my-theme/Magento_Customer/templates/address/edit.phtml
.
I can still use this method to completely omit certain fields from the form but I can not control the order of the fields in this way any more.
Do I need to also create a layout file since the new Magento update or something?
Best Answer
You can also update sorting customer address field from database table. you will update table
customer_eav_attribute
fieldsort_order
. update query like below for zipcode show before city.