Customer Portal Modification needed to "Resolution" field

How can I modify the Customer Portal layout to display the "Resolution" field only if the field contains text / information?

The goal is to not have the Resolution field visible in the Customer portal if it is empty. 

Thoughts about the best way to do this, if possible?

Thanks so much for any insight!

  • Hi Missy Brooks 

    It is easy to accomplish, but it requires editing a php file.

    Open the file custom/modules/Cases/clients/portal/views/record/record.php and add a content like that:

    $viewdefs['Cases'] =
    array (
    'portal' =>
    array (
    'view' =>
    array (
    'record' =>
    array (
    'buttons' =>
    array (
    0 =>
    array (
    'name' => 'sidebar_toggle',
    'type' => 'sidebartoggle',
    ),
    ),
    'panels' =>
    array (
    0 =>
    array (
    'name' => 'panel_header',
    'header' => true,
    'newTab' => false,
    'panelDefault' => 'expanded',
    'label' => 'LBL_RECORD_HEADER',
    'columns' => 2,
    'labelsOnTop' => 1,
    'placeholders' => 1,
    'fields' =>
    array (
    0 =>
    array (
    'name' => 'picture',
    'type' => 'avatar',
    'size' => 'large',
    'dismiss_label' => true,
    'readonly' => true,
    ),
    1 =>
    array (
    ),
    2 =>
    array (
    'name' => 'name',
    'span' => 12,
    ),
    ),
    ),
    1 =>
    array (
    'name' => 'panel_body',
    'label' => 'LBL_RECORD_BODY',
    'columns' => 2,
    'labelsOnTop' => true,
    'placeholders' => true,
    'newTab' => false,
    'panelDefault' => 'expanded',
    'fields' =>
    array (
    0 =>
    array (
    'name' => 'case_number',
    'span' => 12,
    ),
    1 =>
    array (
    'name' => 'description',
    'span' => 12,
    ),
    2 =>
    array (
    'name' => 'resolution',
    'span' => 12,
    ),
    3 => 'status',
    4 => 'priority',
    5 =>
    array (
    'name' => 'type',
    'span' => 12,
    ),
    6 =>
    array (
    'name' => 'date_entered_by',
    'readonly' => true,
    'type' => 'fieldset',
    'label' => 'LBL_DATE_ENTERED',
    'fields' =>
    array (
    0 =>
    array (
    'name' => 'date_entered',
    ),
    1 =>
    array (
    'type' => 'label',
    'default_value' => 'LBL_BY',
    ),
    2 =>
    array (
    'name' => 'created_by_name',
    ),
    ),
    ),
    7 =>
    array (
    'name' => 'date_modified_by',
    'readonly' => true,
    'type' => 'fieldset',
    'label' => 'LBL_DATE_MODIFIED',
    'fields' =>
    array (
    0 =>
    array (
    'name' => 'date_modified',
    ),
    1 =>
    array (
    'type' => 'label',
    'default_value' => 'LBL_BY',
    ),
    2 =>
    array (
    'name' => 'modified_by_name',
    ),
    ),
    ),
    8 =>
    array (
    'name' => 'assigned_user_name',
    'readonly' => true,
    ),
    9 =>
    array (
    ),
    ),
    ),
    ),
    'dependencies' => array(
    array(
    'hooks' => array('all'),
    'trigger' => 'true',
    'triggerFields' => array('resolution'),
    'onload' => true,
    'actions' => array(
    array(
    'action' => 'SetVisibility',
    'params' => array(
    'target' => 'resolution',
    'value' => 'not(equal($resolution, ""))'
    )
    ),
    )
    )
    ),
    'templateMeta' =>
    array (
    'useTabs' => false,
    ),
    ),
    ),
    ),
    );

    Mind the bold content. This is the real piece of code you have to place into your local file.

    Remember to run QRR after saving the file.

    André Lopes
    Lampada Global
    Skype: andre.lampada
  • Hello Missy,

    With customization, it is possible to modify the Customer Portal layout for display Resolution field, if it is with the text value. You can contact CRM/ web portal developer for your custom requirements.

    Thanks.