After SugarCRM 10.x version release we have issue in label display for a 6 column layout

Hi All,

As in 10.x feature SugarCRM introduced record label placement like above the field or beside the field. Due to this labels are not displayed for a 6 column layout.

Currently we're using 6 column layout to represent the fields in tabular format to present the data in record view.

Below is the code

6 =>
array (
'newTab' => false,
'panelDefault' => 'expanded',
'name' => 'LBL_RECORDVIEW_PANEL8',
'label' => 'Annual Revenue',
'columns' => 6,
'labelsOnTop' => 1,
'placeholders' => 1,
'fields' =>
array (
0=> array (
'label' => 'Estimated Annual Volume',
),
1=> array (
'label' => 'Year 1',
),
2 =>
array (
'label' => 'Year 2',
),
3 =>
array (
'label' => 'Year 3',
),
4 =>
array (
'label' => 'Year 4',
),
5 =>
array (
'label' => 'Year 5',
),
6=> array (
'label' => 'Target Price(USD)',
),
7=> array (
'name' => 'target_price_year_1_c',
'label' => ' ',
),
8 =>
array (
'name' => 'target_price_year_2_c',
'label' => ' ',
),
9 =>
array (
'name' => 'target_price_year_3_c',
'label' => ' ',
),
10 =>
array (
'name' => 'target_price_year_4_c',
'label' => ' ',
),
11 =>
array (
'name' => 'target_price_year_5_c',
'label' => ' ',
),
12=> array (
'label' => 'Annual Volume',
),
13=> array (
'name' => 'annual_volume_year_1_c',
'label' => ' ',
),
14 =>
array (
'name' => 'annual_volume_year_2_c',
'label' => ' ',
),
15 =>
array (
'name' => 'annual_volume_year_3_c',
'label' => ' ',
),
16 =>
array (
'name' => 'annual_volume_year_4_c',
'label' => ' ',
),
17 =>
array (
'name' => 'annual_volume_year_5_c',
'label' => ' ',
),
18=> array (
'label' => 'Annual Revenue(USD)',
),
19=> array (
'name' => 'annual_revenue_year1_c',
'label' => ' ',
),
20 =>
array (
'name' => 'annual_revenue_year_2_c',
'label' => ' ',
),
21 =>
array (
'name' => 'annual_revenue_year_3_c',
'label' => ' ',
),
22 =>
array (
'name' => 'annual_revenue_year_4_c',
'label' => ' ',
),
23 =>
array (
'name' => 'annual_revenue_year_5_c',
'label' => ' ',
),
),
),

Above code will represent the data like below in tabular format of 9.3 version

https://drive.google.com/drive/u/0/folders/1Q_8uTb1szObT7M4pi9SgU1_6ytYlsn2u

But the same code we use in 10.1 the labels are not showing tabular format.

Does anyone have any idea?

Parents
  • Hi Raman,

    I have tried in my local machine by setting the 6 column layout in one of the module in 10.x Sugar Instance and experienced the issue what you have told. As you know that if the filed label placement is set to "beside field value" option in your profile even for the 2 column layout the field label will not be displayed completely until you hover on the specific field label and this is sugar default behaviour and as you are trying to use six column layout with beside value option the real estate in record view is not supported as it requires more space. If your requirement is six column layout, could you please change the field label placement option to "above field value" in your profile and check this. Otherwise could you try for 3 column or 4 column layout which gives field labels even with Beside field value option. Let me know if it works.

    This is how it looks Field Label Placement as "Above Field Value" with six column layout.

Reply
  • Hi Raman,

    I have tried in my local machine by setting the 6 column layout in one of the module in 10.x Sugar Instance and experienced the issue what you have told. As you know that if the filed label placement is set to "beside field value" option in your profile even for the 2 column layout the field label will not be displayed completely until you hover on the specific field label and this is sugar default behaviour and as you are trying to use six column layout with beside value option the real estate in record view is not supported as it requires more space. If your requirement is six column layout, could you please change the field label placement option to "above field value" in your profile and check this. Otherwise could you try for 3 column or 4 column layout which gives field labels even with Beside field value option. Let me know if it works.

    This is how it looks Field Label Placement as "Above Field Value" with six column layout.

Children
  • Thanks for the response  

    I have already changed the Field Label Placement as "Above Field Value" even after the labels are not displayed. we have found the issue, actually in 9.3 version we have used labels directly in record.php which helps to displays the labels only in UI. But in 10.1 that's is not working for each label we need to specify the respective name in record.php like below

    For example:This will work in 9.3 version by directly using the labels in record.php

    array (
    0=> array (
    'label' => 'Estimated Annual Volume',
    ),
    1=> array (
    'label' => 'Year 1',
    ),

    In 10.1 we need to include name (field API) in record.php like below to show the labels in UI

    array (
    0=> array (

    'name' => 'Estimated_Annual_Volume_c',
    'label' => 'Estimated Annual Volume',
    ),
    1=> array (

    'name' => 'Year_1_c',
    'label' => 'Year 1',
    ),

    we don't have an option to use the labels directly in record.php in 10.1 to display the labels.

    Regards,

    Thiravi

  • Hi Raman,

    Are you trying to set the layout through record.php file? If you are admin user can you please go to studio -->your module name-->layouts-->record view. In record view can you please save and deploy the layout and see what are the changes incorporated in the record.php of your specific module and can you also give a  screenshot of record view layout of your module from studio, so we can identify why it is happening for you.