Entity Phone Field

Introduction
Entity Phone Field provides a reusable country-aware phone field for user
entities. It adds a field widget that lets users select a country dial code
and enter a local phone number, storing the result in international format
(e.g. +91XXXXXXXXXX).
Features

Adds field_phone to the User entity on installation
Country dropdown populated from the REST Countries API
Cached country data for performance
Stores phone numbers in international format
Reusable Country Phone Widget field widget
Settings form to configure the default country code
Safe install and uninstall handling

Requirements

Drupal core 10.3 or 11
drupal:field and drupal:user core modules

Installation
Install as you would normally install a contributed Drupal module. See
Installing Drupal Modules
for further information.
drush en entity_phone_field
Configuration
After enabling the module:

Go to Administration > Configuration > People > Phone Field Settings
(/admin/config/people/entity-phone-field) to set the default country code.
Go to Administration > Configuration > People > Account settings >
Manage form display (/admin/config/people/accounts/form-display).
Enable the field_phone field and select Country Phone Widget.
Save the form display configuration.

Supporting organizations: 

Project information

  • caution Minimally maintained
    Maintainers monitor issues, but fast responses are not guaranteed.
  • caution Maintenance fixes only
    Considered feature-complete by its maintainers.
  • chart icon1 site reports using this module
  • Created by chaitanyadessai on , updated
  • shieldStable releases for this project are covered by the security advisory policy.
    Look for the shield icon below.

Releases