The International Phone field is one of the Special Fields that can be added to a form. It display a text field for accepting and validating international telephone numbers. It adds a dropdown list with flags, countries, and international dial codes. Users can navigate the list by typing a country's name, or using up/down keys. You can also choose to detect the user's country automatically.
Selecting a country from the list updates the dial code in the input field. The phone number is formatted automatically as the user types, to match the style used in their country.
[screencapture: International phone field showing dropdown]
Validating and formatting international telephone numbers requires a large external library. This library is over 200k. It is loaded on-demand and after the initial page load so that it does not slow down or block page loading.
Three other properties are related to this one: DefaultCountry, PreferredCountries and OnlyCountries.
|DefaultCountry||Enter auto to automatically detect the user's country based on their IP address. Or, you can enter a 2 digit country code to set the default.|
|PreferredCountries||Enter a comma separated list of countries to be displayed at the top of the drop down list. Use the 2 digit country codes. For example, if your customer base is mostly in North America you would enter CA,US so that customers from those countries do not have to search for their country in the list. However, customers from other countries could still find their flag and dial code.|
|OnlyCountries||Enter a comma separated list of countries to display ONLY these countries in the drop down list. Use the 2 digit country codes. For example, if you served only customers in North America you would enter CA,US in this field. Customers from other countries would be unable to find their flag or dial code.|