Remove Salutation from Contacts, Leads and so on

Hi everyone,

I’m trying to get rid of the salutation field in e.g. Contacts.

I’ve tried to follow this topic here, but it doesn’t seem to work for me:

I’ve copied ā€œeditviewdefs.phpā€ from legacy/modules/Contacts/metadata, pasted it into legacy/custom/modules/Contacts/metadata and commented the salutation entries out:
editviewdefs.php →

    array(
      'lbl_contact_information' =>
      array(
        0 =>
        array(
          0 =>
          array(
            'name' => 'first_name',
            /* 'customCode' => '{html_options name="salutation" id="salutation" options=$fields.salutation.options selected=$fields.salutation.value}&nbsp;<input name="first_name"  id="first_name" size="25" maxlength="25" type="text" value="{$fields.first_name.value}">', */
          ),
          1 =>
          array(
            'name' => 'last_name',

After a ā€œQuick Repairā€ and page reload (Ctrl+F5; developer mode is activated btw.) nothing changes.

Any suggestions?

Kind regards,
Dominik

As per the screenshot, it appears you are using SuiteCRM 8. The solution mentioned above applies only to the legacy system.

In SuiteCRM 8, fields are displayed using group fields, so you’ll need to update the group field definitions located in:
config/services/record/fields/grouped_fields_type_map.yaml

Remove the salutation field from this file as shown in the image, then perform a Repair and Rebuild.

1 Like

Hello Dominik,

do you need to touch the code or is it sufficient to remove the fields from the layouts?

If you remove the field ā€˜name’ in studio and add first and last name instead (in to separate spots), there is no salutation anymore:

image

1 Like

Thank you very much, I’ll give it a try :slightly_smiling_face:

And yes, I’m using SuiteCRM 8.8.0.

Hello Bastian, that’s a great solution! Thank you very much =)

1 Like