Format string replacement should have conditional to determine if using an initial

Created on 6 April 2016, over 9 years ago
Updated 23 May 2025, 3 months ago

I have a site where we have a lot of names that only use a middle initial. The Middle name field works fine for this, but in the format settings it would be useful to be able to specify a conditional that says something to the effect of:

$middle_name = (strlen($middle_name) === 1) ? $middle_name . '.' : $middle_name;
✨ Feature request
Status

Closed: outdated

Version

1.0

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States nicholas.alipaz

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States bluegeek9

    I believe the Name formatter service was released after this issue was created. It has a feature for this.

    y
    First letter middle.
    (lowercase Y)

Production build 0.71.5 2024