Address layout modification

I’m trying to change the order of the address field lines for Accounts. Specifically the Postalcode I would like after the city in both edit and detail views. Previous posts have always pointed to customising the include/sugarfields/fields/address/… , but when I view these files (editview.tpl & detailview.tpl), the postalcode comes after the city. Why then does this not reflect in the views.

Can anyone please point me to where this can be modified?


Where do you see them? I mean, which module, which view, which screen, which button do you press to see them on the screen in the wrong order?

Can you please check same for at include/sugarfields/fields/address for file “en_us.EditView.tpl” and “en_us.DetailView.tpl”

Hi pgr, I have installed a fresh instance of 8.1.3 with the sample data to make sure it wasn’t something to do with my working instance. I have not made any alterations.

Everywhere the billing address or shipping address or primary address or alternative address displays, both in detail and edit views of accounts and contacts and leads modules, the postalcode field appears before the city. I believe the same piece of code (somewhere) is responsible for ordering the address lines in this order for billing, shipping, primary and alternative address blocks.

I have searched for hours to see where this is coded, but without success. It doesn’t appear to be in the editview.tpl, detailview.tpl, en_us.EditView.tpl, en_us.detailView.tpl, as these files have the postalcode field in the correct order from what I can see.

I am relatively new to SuiteCRM and probably missing something very obvious. Any help is very much appreciated.


Thanks urdhvatech, yes I checked those. Please see my answer to pgr.

Aah, You are asking about the Suite 8.1.*

If you wish to change Address sequence, You need to edit group field definition to change sequence at

After changing this you need to do Admin->Repair->Quick Repair and Rebuild
Yet, I am not sure about upgrade safe change.


Good morning urdhvatech, I altered the grouped_fields_type_map.yaml, did a quick repair, but there was no change. Argh!

So I started another search for ‘postalcode’ and the very first hit was… line 4005 in


I altered this file at lines 4005 from ;

           'address' => [
                'layout' => [
                   0 => 'street',
                   1 => 'postalcode',
                   2 => 'city',
                  3 => 'state',
                    4 => 'country',


           'address' => [
                'layout' => [
                   0 => 'street',
                   1 => 'city',
                   2 => 'postalcode',
                  3 => 'state',
                    4 => 'country',

and it immediately changed at all instances of addresses without a quick repair. That is in Accounts, contacts and leads, wherever there is an ‘address block’.

After a little more investigation, it appears this file is created in part from grouped_fields_type_map.yaml if it does not exist. So the App_KernelProdContainer.php file either needs to be deleted or altered as I have done (to match the yaml alteration).

Developer Mode does not seem to delete this file with a quick repair.

Thank you urdhvatech, I don’t think I would have found this without your help.


SuiteCRM 8.1.3 on MAMP with PHP7.4.21

OK, so having resolved the postalcode move to after city in ‘Grouped Addresses’ , the next step I’d like to achieve is adding a ‘Suburb’ field/line between street and city for all grouped addresses, because that’s what we use down here in this part of the world.

So I thought I’d start with just the billing address in the Accounts Module. I followed much of Add district into address by cloudcon.
Also added in ‘suburb’ in the grouped_fields_type_map.yaml. Did all the usual Admin → Repair → Quick Repair and Rebuilds. Made sure the cache was deleted.

I have the the extra field in the database, I can show it in listview of Accounts, but (after a full day of tinkering) I cannot get it to show in the Billings grouped address on Accounts. Not in Detail View or Edit View.

I would really appreciate any help here please.


Maybe this should be a new topic???

I am glad that it worked for you. Yes, separate topic will help others as well.

I suspect the missing step to update things without manually clearing cache files might be the ng command-line to generate the Angular front-end

Can you please mark this thread as solved?

Hi pgr, can you explain this further please. I am no expert on Angular. Are you saying that there is a command I should use to solve this problem?

I am not that expert, but If you wish to clear cache form backend. You can use the command like this.
./bin/console cache:clear

I also don’t know much about Angular.

It’s just then you mentioned the file you needed to change was in a cache…:

… I suspect that that was a generated file and that somewhere there is:

  1. An “eariler” file from which that one was built, which is where you really should be changing things
  2. Some process to cause the generation to take place

Number 2 was the Quick Repair and Rebuild in the legacy SuiteCRM 7, now it’s still the QR&R but also adds some front-end generation.

Thanks pgr & urdhvatech for clearing that up. Your help is appreciated.