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,

    After creating the fields and doing the record view layout arrangement it automatically creates a record.php file with all field names and label values set for specific field in that record view for any module. Please check what is the code exisitng in the record.php file in custom/modules/<module name>/clients/base/views/record/record.php. Probably you should use the same code similarly. And one more thing why you want to call another layout based on field status. Can you try making fields dependent(hide/show) based on quote status through studio which makes your job easier.if you are not able to do through studio you can also make fields show/hide through custom JS.

Reply
  • Hi Raman,

    After creating the fields and doing the record view layout arrangement it automatically creates a record.php file with all field names and label values set for specific field in that record view for any module. Please check what is the code exisitng in the record.php file in custom/modules/<module name>/clients/base/views/record/record.php. Probably you should use the same code similarly. And one more thing why you want to call another layout based on field status. Can you try making fields dependent(hide/show) based on quote status through studio which makes your job easier.if you are not able to do through studio you can also make fields show/hide through custom JS.

Children
No Data