Author Topic: Adjust visible fields in Address Book  (Read 623 times)

Offline kolaloka

  • Newbie
  • *
  • Posts: 2
Adjust visible fields in Address Book
« on: January 04, 2017, 04:31:23 AM »
I am trying to change addressbook displayed fields so that it would display a street or location along with the name in address list and when autocomplete email address like this:

originally:
John Black <john.black@email.org>
desired:
John Black - Manchester <john.black@email.org>

Can anyone give me a hint which instruction or variable to change?

Thanks a lot. Kolaloka

Offline alec

  • Hero Member
  • *****
  • Posts: 1,024
Re: Adjust visible fields in Address Book
« Reply #1 on: January 04, 2017, 05:06:37 AM »
Try
Code: [Select]
$config['contact_search_name'] = '{name} {street} - {locality} <{email}>'; but this is only for autocompletion.

Offline kolaloka

  • Newbie
  • *
  • Posts: 2
Re: Adjust visible fields in Address Book
« Reply #2 on: January 04, 2017, 07:09:56 AM »
Thank you very much for your quick reply.
I tried what you suggested, and even did some modifications, however it does not work as expected. Just shows the 'name' and 'email', or only 'email'.

Hoever I found a common sense workaround:
I remapped my shared ldap address book like this:
 # 'name'        => 'cn',   
    'firstname'   => 'givenName',
    'middlename'  => 'sn',
    'surname'     => 'locality',
and that works
:-)
The important thing is to hide the 'name', so that RC tries to construct it from firstname+middlename+surname.