Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Name Field

Security covered Maintenance fixes only 6,834 sites

This module provides a flexible name field for capturing various parts of a person's name, such as title, given name, family name, and credentials. It offers customizable formatting options and integrations with other Drupal modules.

Name Field is a module that provides a multi-component name field for the Field API.

Features

  • Select between one to five separate fields to capture a persons title, given (first), middle, family (surname), generational suffix and credentials (post-nominals).
  • Name and name list formatters.
  • Real / Display name: create an alternative screen name to the users login name. To enable this feature, simply add a name field to the user bundle and enable this feature when configuring the field.
  • Select or Text field support for Titles and Generational suffixes.
  • Optional autocomplete options for all text fields
  • Easier styling with component CSS classes and optional RDFa and microdata markup in formatter output; the RDF UI module can help manage RDF mappings.
  • Inline component markup formatting options. This can be found in the field formatting options.
  • Formatter link options.
  • Nickname / preferred field support in the format pattern tokens.
  • Alternative field replacement support in the format pattern tokens, for use cases such as a maiden name.

Custom name format strings

These formatters can be as simple as E which will print either the family name, or the given name if the family name is empty.

They can be fairly complicated for specific requirements, such as t+ LG((f-,)+ (x-.)+ (y-.))+ (=\[Uc-\]). This prints the title, the family name with the first letter in uppercase, the initials of the first and middle names in uppercase, followed by the credentials in uppercase, wrapped in square brackets. This could print something like "Mr Doe, J. J. [B.SC., PH.D.]" for a person that has filled out all fields, to just "J." for a person that only filled out their first name.

Integrations

Development ⚙

If you haven't already, install Docker and DDEV

git clone [email protected]:project/name.git
cd name
ddev config --project-type=drupal --docroot=web --php-version=8.4 --corepack-enable --project-name=name
ddev add-on get ddev/ddev-drupal-contrib
ddev add-on get s-ayers/ddev-drupal-contrib-mkdocs
ddev start
ddev poser
ddev symlink-project
ddev drush site:install -y
ddev drush pm:install name -y
ddev drush config:export -y
ddev drush user:login

Consider sponsoring DDEV development.

Every MR on this project automatically generates a live preview environment powered by Tugboat, so reviewers can test changes on a real site without any local setup. Want to add the same to your project? Here's how to get started.

Drupal 10–11

Ask your assistant about Name Field

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

  • field Drupal core

Required by

1 tracked project depends on this one

Activity

Tracked releases
9
Tracked since
Mar 2023
Latest release
3 months ago
Releases (12 mo)
6 ▲ from 1
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
2.0.x-dev Dev 11 Jul 14, 2026
8.x-1.5 Stable 10–11 May 24, 2026
8.x-1.4 Stable 10–11 May 19, 2026
8.x-1.3 Stable 10–11 May 9, 2026
8.x-1.2 Stable 10–11 Mar 24, 2026
8.x-1.1 Stable 10–11 Nov 3, 2025
8.x-1.0 Stable 10–11 Nov 28, 2024
8.x-1.0-rc6 Pre-release 9–10 Dec 8, 2023
8.x-1.0-rc5 Pre-release 8–10 Mar 2, 2023