Disable inline editing for lead name field

I would like to be able to disable inline editing in the leads module, for the name field. is there any way to do this? The name field is not in studio under fields.

1 Like

Hi,

I assume you mean the field that you can see on the Detailview of the lead record?

If so, You can disable inline editing with the following steps;

Navigate to: /custom/Extension/modules/Leads/Ext/Vardefs/

and in this location, create the file: sugarfield_full_name.php

In this file, enter the lines:


<?php
$dictionary['Lead']['fields']['full_name']['inline_edit']=false;

Then run a Quick Repair and Rebuild in your CRM.

2 Likes

Thank you for you response. This solution did indeed work in the detail view, how ever I am trying to disable the inline editing of the field in the list view. I find that when our users click the link they tend to double click it rather then single click.

Hi,

If you want to disable it in the List view, its roughly the same process.

Copy the file found at /modules/Leads/metadata/listviewdefs.php

and paste it in the location: /custom/modules/Leads/metadata/

If this location doesn’t exist, feel free to create it.

In the newly pasted file, Where it says:


array (
  'NAME' => 
  array (
    'width' => '10%',
    'label' => 'LBL_LIST_NAME',
    'link' => true,
    'orderBy' => 'name',
    'default' => true,
    'related_fields' => 
    array (
      0 => 'first_name',
      1 => 'last_name',
      2 => 'salutation',
    ),
  ),

Add the line ‘inline_edit’=>false so that it becomes:

array (
  'NAME' => 
  array (
    'width' => '10%',
    'label' => 'LBL_LIST_NAME',
    'link' => true,
    'orderBy' => 'name',
    'default' => true,
    'inline_edit' =>false,
    'related_fields' => 
    array (
      0 => 'first_name',
      1 => 'last_name',
      2 => 'salutation',
    ),
  ),

Then run a Quick Repair and Rebuild and CTRL+F5 to clear cache and refresh your browser.

The inline edit should now be disabled for that field on the listview specifically.

3 Likes

Thank was exactly what I needed. Thank you for your help John. :cheer:

As a side note, this won’t affect anything even the code if the below checkboxes are ticked. If it is ticked it will make any field inline editable or inline list view editable whatsoever.
Admin > System Settings > Enable inline editing on list view
Admin > System Settings > Enable inline editing on detail view