Phone Field

The Phone Field Type helps you manage valid international phone numbers with a custom Phone Field.

Sprout Phone Field

When a phone number is recognized, a Phone icon appears at the right hand side of the phone field. If you click on the Phone link, your computer will open your primary phone program to initiate a call.

The Phone Field helps parse, format, and validate phone numbers for all countries and regions of the world.

# Templates

The Phone Field is provided to your Twig Template as a Phone Model with several options:

{{ }} {# 707-541-4131 #} {{ }} {# US #} {{ entry.phoneField.code }} {# 1 #} {{ }} {# +1 707-541-4131 #} {{ entry.phoneField.national }} {# (707) 541-4131 #} {{ entry.phoneField.E164 }} {# +17075414131 #} {{ entry.phoneField.RFC3966 }} {# tel:+1-707-541-4131 #} 

# Settings

Phone Numbers are validated based on the country that is selected. Validation is powered by Google's international phone number library libphonenumber.

By default, the Phone Field is setup for international addresses from all countries but can be limited to a single country as well.

# Availability

Craft Version Available
Craft 3 (Url Field)
Craft 2 (Link Field)

See here for documentation on the Phone Field for Craft 2.