2

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.

2

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.