Adding additional columns to layouts

Followed the directions here: http://support.sugarcrm.com/04_Find_Answers/03_Developers/100Customization/Modifying_Layouts_to_Display_Additional_Columns/

Wanted to add a 3rd column to some of the contact and account layouts. Tested with just the accounts detail layout using the recommended code in the detailviewdefs.php file in /custom/modules/Accounts/metadata

‘maxColumns’ => ‘3’,

‘widths’ =>
array (
0 =>
array (
‘label’ => ‘10’,
‘field’ => ‘30’,
),
1 =>
array (
‘label’ => ‘10’,
‘field’ => ‘30’,
),
2 =>
array (
‘label’ => ‘10’,
‘field’ => ‘30’,
),
),

Making those changes results in the attached screenshot. Nothing is viewable in the Studio>>Module Builder>>Accounts>>Layouts>>Detail View

Hi shields,

After making your changes, did you navigate to Admin -> Repair and perform a Quick Repair & Rebuild?

Thanks,

Will.

I did indeed. I do that after every modification I make.

1 Like

Anyone?

Have We got any News on this?

Have you tried Rebuild Relationships under the Admin >> Repair menu? That way the cache gets dropped.

Hello
I am stuck on this issue. Do you have ideas ?
Thanks

What theme are you using? I have noticed an issue with the new theme picking up the additional columns.

I am using the version 7.7.8 and the default theme (Suite P).

The process to add additional columns is got to custom/modules/~Your Module Name~/metadata/editviewdefs.php. Look for the ‘maxColumns’ array item and change the value to however many columns you need. Then repeat in the detailviewdefs.php file so they match, if you want them to.

Once you have done that and saved the fields, go to Admin >> Repair >> Quick Repair and Rebuld.

After that, go to the Studio, find your module and you should be able to add fields to the additional columns.

Hi, i’m new to SuiteCRM ver. 7.10 Sugar Version 6.5.25 (Build 344)

i follow your tips but what i got is just 4 fields in a row, and not 4 columns. plz look this pic.

What you are trying to do seems to have broken with the new theme.

Ok so there is a way or not plz?
Tnx!

To the best of my knowledge, as of right now, it does not work. If it did, I wouldn’t be stuck on the 7.8 LTS version.

Hi,

I’m also trying to add additional columns. I changed the maxColumns value and the details and edit views in a custom module. then ran quick repair and rebuild relationships as suggested but I still can only see two columns on studio.

Using default theme and Suitecrm version 7.11.6

Hi @jbaptiste ,

Unfortunately what you ask is not possible with SuiteP (the current official theme)… Unless you modify it and create your own theme version.

Here is some documentation on how to setup your custom theme:

Thanks,

BrozTechnologies

It can be achieved, but need to change the column width in style.css for the used theme.

\custom\themes\SuiteP\css\subthemename\style.css

.col-sm-6 {
width: 33%;
}

Updates… It broke other part of the theme… So not the right path to get three column structure

@BrozTechnologies @sanjaycrm @jbaptiste @digitalmcgrath

Hello,

We have v7.13 and we are trying to set max_columns to 3.

But, it is displaying only two columns.

Is there a way that we could edit code in suiteP and get 3 columns for edit view of all modules. I could see three columns in detail view though.

Thanks in an advance!

I know it’s a little bit late…

It’s not possible to have more than 2 columns unless you do a lot of crazy modifications on the theme. At this point I still don’t know about anyone doing it.