Hopefully self explanitory.
I want to extract the initial from the first name (if there is one) e.g. Mr John Smith appears as Mr J Smith as default.
Would be grateful for any help on this one.
CiviCRM Stack Exchange is a question and answer site for administrators and users of the CiviCRM Constituent Relationship Management software. It only takes a minute to sign up.
Sign up to join this communityHopefully self explanitory.
I want to extract the initial from the first name (if there is one) e.g. Mr John Smith appears as Mr J Smith as default.
Would be grateful for any help on this one.
You can alter the 'Individual Display Name Format' in display preference to include {initial} token through custom extension using tokens and tokenvalues hook.
If you don't want to store this in the database and just alter the display on screen then you can use contact_get_displayname hook to alter the display name.
Pradeep