Experimental Project

This is a sandbox project, which contains experimental code for developer use only.

Re-working of the phone & cck phone modules to be combined and use libphonenumber. See #1812184: [meta] Rewrite and merge phone and cck_phone for history.

This version of the phone module has the following features:

  • Provides a Phone field type, Phone field widget, and several formatters.
  • Provides a Phone FAPI element which can be used in custom modules.
  • Backports the "tel" input element from D8 as "phone_tel", and allows this to be used for number input elements.
  • One field instance can support every country.
  • Limit allowable countries.
  • Includes customisable comment/label support (Work, Home, Fax, etc..).
  • Full region level validation for all phone numbers using libphonenumber. This supports most if not all known countries, and works for both the Phone field widget, and Phone FAPI element.
  • Region specific output formatting using libphonenumber, supporting International, National, E.164, and RFC3966 output styles.
  • tel: href support using RFC3966.
  • Full token support.
  • Feeds & Migrate integration.
  • Microdata (itemprop=telephone), RDFa (foaf:phone), and microformats hcard (class="tel/type/value") support. Full type support can be enabled by customising the available comment options.
  • Devel Generate support. Handy, if you need an Acquia sales office phone number.
  • Views and Entity API integration.
  • Support for countries to be disabled via external modules like the Countries module.

There is currently no upgrade path from Phone or Phone Number.

NB: Only feature currently not available from the above modules that I'm aware of is the ability to disable country validation form Phone number. I don't expect this to be a problem using libphonenumber for validation.

Project Information