Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Release: Opensolr Search 4.5.0 Minor update available for module opensolr_search (4.5.0). Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Release: Video.js (HTML5 Video Player) 10.0.0-alpha1 First alpha version released for module videojs (10.0.0-alpha1). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Usage Milestone: Views Reference Filter Module entityreference_filter crossed 10,000 active installs. Usage Milestone: Dropdown Language Module dropdown_language crossed 10,000 active installs. Usage Milestone: Paragraphs Browser Module paragraphs_browser crossed 10,000 active installs. Usage Milestone: OpenAPI Module openapi crossed 10,000 active installs. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Name Field

6,365 sites Security covered Drupal 10–11
View on drupal.org

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.

Depends on

Dependencies of the latest stable release

  • field Drupal core

Required by

1 tracked project depends on this one

Activity

Tracked releases
7
Tracked since
Nov 2024
Latest release
1 month ago
Releases (12 mo)
6 ▲ from 1
Maintenance
Active

Release Timeline

Releases

Version Type Core 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