Hello!
Is the possible to show in Layouts instead Full name with salutation, data from created in module Contacts text field (Nickname) if it is filled?
For example, if fields Firstname and Lastname filled, but also filled field Nickname than show everywhere in layouts Salutation + Nickame or if Nickname field not filled, show everywhere Salutation + Fistname + Lastname.
Thank you for answers.
Hi, you can modify the display of your detailviewdefs by JavaScript custom code by editing
custom/modules/Contacts/metadata/detailviewdefs.php
like this:
array (
'name' => 'full_name',
'label' => 'LBL_NAME',
'customCode' => '
<script type="text/javascript">
if("{$fields.nickname_c.value}" != "")
document.setElementById("full_name").value = "{$fields.salutation.value} {$fields.nickname_c.value}";
</script>',
1 Like
Thank you very much for your answer. ![:wink: :wink:](/images/emoji/google/wink.png?v=9)
Is your example really fit for my needs? Iām attached few screens with comments. I need to change everywhere in SuiteCRM Fullname view to Nickname, if Nickname filled in contact form.
![](/uploads/migrated/kunena/attachments/32860/contacts_list.png)
![](/uploads/migrated/kunena/attachments/32860/contact_full.png)
Please, excuse me for my English.
Thank you!