Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Varbase FAQs 9.2.1 Minor update available for module varbase_faqs (9.2.1). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

Name Field

6,466 sites Security covered
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 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.

Activity

Total releases
6
First release
Nov 2025
Latest release
3 days ago
Releases (12 mo)
6 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Release date
2.0.x-dev Dev Jul 14, 2026
8.x-1.5 Stable May 24, 2026
8.x-1.4 Stable May 19, 2026
8.x-1.3 Stable May 9, 2026
8.x-1.2 Stable Mar 24, 2026
8.x-1.1 Stable Nov 3, 2025