Address, telephone and email fields for CraftCMS 3.x

Installs: 11 850

Dependents: 0

Suggesters: 0

Security: 0

Stars: 50

Watchers: 2

Forks: 12

Open Issues: 14


0.0.15 2020-05-19 04:34 UTC

This package is auto-updated.

Last update: 2020-06-19 04:52:07 UTC


Attention: This plugin is under active development and will change. This is a preview release.

Address, telephone and email fields for CraftCMS 3.x


Address field powered by Google's dataset (commerceguys/addressing).


  • Auto-complete powered by Google Place API
  • Address form formatting based on country powered by commerceguys/addressing
  • Validation / Geo-coding on submission (TODO)

Template Tags:

The normalizeValue method always returns an AddressModel. All public properties are available:

Given entry.address is your field…

{{ entry.address.countryCode }}
{{ entry.address.administrativeArea }}
{{ entry.address.locality }}
{{ entry.address.dependentLocality }}
{{ entry.address.postalCode }}
{{ entry.address.sortingCode }}
{{ entry.address.addressLine1 }}
{{ entry.address.addressLine2 }}
{{ entry.address.organization }}
{{ entry.address.recipient }}
{{ entry.address.locale }}

{{ }}
{{ }}
{{ }}
{{ }}
{{ }}
{{ }}

{{ entry.address.placeData }}
{{ entry.address.latitude }}
{{ entry.address.longitude }}
{{ entry.address.mapUrl }}

Address Demo


Telephone field powered by Googles phone number library implemented via giggsey/libphonenumber-for-php


  • Validate phone number based on country code
  • Format phone number as E164, international, national or RFC3966
  • Stores Telephone model and raw user input

Template Tags:

Given entry.telephone is your field…

{{ entry.telephone }} outputs the phone number in international format.

You can also choose a specific format:

{{ entry.telephone.format('E164') }}
{{ entry.telephone.format('international') }}
{{ entry.telephone.format('national') }}
{{ entry.telephone.format('RFC3966') }}

The raw input from the user is also available:

{{ entry.telephone.rawInput }}

Telephone Demo



  • Email validation using Yii validation

Email Demo



  • Embed social media posts / media directly from a URL
  • Live preview

Template Tags:

Given entry.embedField is your field…

  • {{ entry.embedField.embedData }} outputs the returned embed object.
  • {{ entry.embedField.embedData.code | raw }} outputs the returned embed javascript code.

Embed Demo

Person Name

Person name field with:

  • Honorific Prefix
  • Given Names
  • Additional Names
  • Family Names
  • Honorific Suffix

Person Name Demo


Non-binary gender field with:

  • Sex
  • Identity



Step 1: Download the Bundle

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

$ composer require newism/craft3-fields

This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.

Step 2: Install

Install plugin in the Craft Control Panel under Settings > Plugins.


The plugin comes with a config.php file that defines some sensible defaults.

Copy src/config.php to CRAFT_CONFIG_PATH and rename the file to nsm-fields.php.

Road Map

Some things to do, and ideas for potential features:

  • Split out each field into it's own plugin. Keep this plugin as a single composer file which pulls all felds in
  • Address validation / Geo-coding on submission
  • Display address as text in field with option to "Edit" to reduce size of field in UI
  • Update commerceguys/addressing when next stable version is released


  • Release it


  • Add "NSM Publish Hints" field


  • Add video field with yoututbe, vimeo previews See Embed Field


Brought to you by Newism