🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!

Gravity Forms International Phone Number Mask Input Addon

Updated 6 min read Gravity Forms Fields & Inputs
On this page
  1. Video walkthrough
  2. Core Capabilities & Formatting Architecture
  3. Step 1: Installation & Commercial License Activation
  4. Step 2: Adding the International Phone Field to Your Form
  5. Step 3: Enabling International Masking & Country Selector
  6. 1. Default Country & Preferred Countries
  7. 2. Automatic IP Geolocation Country Detection
  8. Step 4: Country Whitelisting & Output Standardization
  9. 1. Country Whitelist (Only Countries) & Blacklist (Exclude Countries)
  10. 2. Standardized Storage Formats (E.164, National, International)
  11. Step 5: Dynamic Input Masking & Real-Time Validation
  12. Step 6: Form Entry Storage & Notification Merge Tags
  13. Countries and Stored Format per Phone Field (version 1.6)
  14. Troubleshooting & Common Issues
  15. Frequently Asked Questions (FAQ)
  16. Does this add-on require an external paid GeoIP service?
  17. Can I search for countries by name or dial code in the dropdown?
  18. Is it compatible with Twilio and WhatsApp automation?
  19. Does it support multiple phone fields on the same form?
  20. Does it work inside multi-page forms and conversational forms?
  21. Ready to Supercharge Your Workflow?

Video walkthrough

Add Country Flags & Phone Validation to Gravity Forms
A short walkthrough: install the add-on, switch a Phone field to the International format and turn on the mask, then see country search, live validation and the Too short message. Watch on YouTube

Add an international phone field to Gravity Forms with a country flag picker, a live input mask and validation. Visitors search for their country by name or dial code, the mask adjusts to that country, and the number is checked as they type. Numbers are saved in standard E.164 format, ready for SMS, CRM and calling tools. This guide covers installation, country defaults, IP-based detection, country lists and output formats.

System Prerequisites & Technical Requirements

  • Gravity Forms v2.5 or higher installed and active.
  • Active SSL Certificate (HTTPS recommended for reliable browser geolocation and secure form handling).
  • PHP 7.4 or higher (PHP 8.1+ fully supported).
  • No third-party API keys or paid external subscriptions required (built-in country database and formatting engine).

Core Capabilities & Formatting Architecture

Standard phone fields frequently capture malformed entries (e.g., missing area codes, incorrect digit counts, or omitted international dialing prefixes). This leads to bounced SMS campaigns and failed sales calls.

The International Phone Number Mask Input addon transforms the user experience by automatically preselecting the visitor’s home country via GeoIP, rendering a high-resolution flag selector, applying real-time national digit masks as the visitor types, and saving standardized E.164 strings (e.g., +14155552671) directly into Gravity Forms entry storage.

Frontend Phone Input with Searchable Flag Dropdown
Figure 1: Live interactive telephone input with national flag dropdown and formatted placeholder

Step 1: Installation & Commercial License Activation

Download the plugin ZIP file from your Gravity Extra customer portal. In your WordPress admin, go to Plugins → Add New → Upload Plugin, choose the downloaded ZIP file, and click Install Now followed by Activate Plugin.

Navigate to Forms → Settings → Phone Number Mask to activate your commercial license key. This ensures automatic updates, compatibility with latest WordPress core releases, and direct support access.

License Key Activation Banner
Figure 2: Verifying your commercial license key for automatic updates

Step 2: Adding the International Phone Field to Your Form

Open any form in the Gravity Forms editor. You can either enhance an existing Phone field or drag a new Phone field from the Advanced Fields toolbox onto your form canvas.

Form Editor Phone Field Properties
Figure 3: Selecting and inspecting the Phone field inside the Gravity Forms builder
General Field Options and Placeholder
Figure 4: Configuring general label, field size, and custom placeholder settings

Step 3: Enabling International Masking & Country Selector

In the field settings panel on the right, open the Phone Format section. Select International (Flag Dropdown) to activate the advanced formatting engine.

Country Flag Dropdown Selector Options
Figure 5: Enabling the flag dropdown and international dialing code selector
Default Country Selection and Preferred Countries List
Figure 6: Specifying default country and pinning priority countries to the top of the list

1. Default Country & Preferred Countries

Choose a fallback default country (e.g., United States or United Kingdom) for visitors when geolocation is unavailable. You can also specify a comma-separated list of Preferred Countries (e.g., us, gb, ca, au) to pin frequently chosen regions at the very top of the dropdown menu.

2. Automatic IP Geolocation Country Detection

Enable the Auto-Detect Country by IP toggle. When a visitor arrives on your page, the script instantly determines their geographic location and preselects their national flag and international dial code without requiring manual selection.

Auto-Detect Visitor Country by IP Geolocation
Figure 7: Enabling real-time IP geolocation auto-detection in field settings

To enable IP-based country detection, obtain a free access token from IPInfo.io and paste it under Forms → Settings → Phone Number Mask.

IPInfo.io Access Token Dashboard
Figure 8: Generating your IPInfo.io access token for visitor country detection

Step 4: Country Whitelisting & Output Standardization

Control which nations can submit your form and standardize output formats for your CRM and marketing automations:

1. Country Whitelist (Only Countries) & Blacklist (Exclude Countries)

If your business operates exclusively within select territories (e.g., North America or the European Union), restrict the dropdown to display only approved countries by entering their 2-letter ISO codes.

Country Whitelist and Blacklist Filters
Figure 8: Restricting available dropdown selections via country whitelisting

2. Standardized Storage Formats (E.164, National, International)

Choose how the phone number is stored in your database upon form submission:

Standardized Output Format Selection
Figure 9: Selecting between E.164, International, National, and RFC3966 formats
Output Format Example Stored Value Ideal Integration Use Case
E.164 (Recommended) +14155552671 Twilio, WhatsApp API, HubSpot, Salesforce, SMS Gateways.
International +1 415-555-2671 Human-readable customer service emails and PDF generation.
National (415) 555-2671 Domestic-only internal workflows and local printing.
RFC3966 tel:+1-415-555-2671 Click-to-call mobile hyperlinks and telephony systems.
Separate Dial Code and Input Field Layout
Figure 10: Displaying the international dial code as a distinct interactive badge

Step 5: Dynamic Input Masking & Real-Time Validation

As the visitor types, the add-on dynamically applies the exact spacing and punctuation rules of the selected country (e.g., (555) 000-0000 for US/Canada, 07123 456789 for UK). If an invalid number of digits is entered, real-time client-side and server-side validation catches the error before form submission.

Real-Time Dynamic Input Masking and Validation
Figure 11: Real-time validation preventing submission of malformed or incomplete phone numbers
Mobile Keypad Optimization with Native Telephone Input
Figure 12: Triggering native numeric dial pads on iOS and Android devices

Step 6: Form Entry Storage & Notification Merge Tags

When the form is submitted, the validated phone number is stored in the entry record and accessible via standard Gravity Forms merge tags (e.g., {Phone:3}) for email notifications, Webhooks, Zapier, and SMS add-ons.

Stored Form Entry with Standardized E.164 Phone Number
Figure 13: Clean E.164 standardized phone number in Gravity Forms entry dashboard
Email Notification and SMS Gateway Merge Tags
Figure 14: Integrating standardized phone merge tags into email notifications and SMS dispatches

Countries and Stored Format per Phone Field (version 1.6)

Open the form, click a Phone field that uses the International format with Active Mask on, and find Countries and stored format in the General tab. Every Phone field has its own settings, so a form can have a local mobile field and a worldwide office field.

  • Default country: the country shown first when the visitor’s country is not known (no IP detection). “Automatic (as before)” keeps the earlier behaviour.
  • Countries at the top of the list: 2-letter codes such as gb, ie, fr. They are shown first, then all other countries.
  • Countries accepted: “Only these countries” shows only the countries you list; “All countries except these” hides the ones you list. The number is also checked on the server when the form is sent, so a number from another country is refused even when the list is bypassed.
  • Save the number as: E.164 +442079460958 (default, best for SMS and CRM tools), International +44 20 7946 0958, National 020 7946 0958 or a link tel:+44-20-7946-0958. The value is saved in the entry and used by merge tags in notifications.

Fields you do not change work exactly as before. The new settings need an active licence key.

Countries and stored format settings of a Gravity Forms Phone field

Gravity Forms phone field with the chosen countries at the top of the flag list

Gravity Forms phone field that only offers United States and Canada

Troubleshooting & Common Issues

Issue Encountered Probable Cause Recommended Resolution
Flags not displaying / broken icons CSS or asset path conflict with caching plugins. Purge server and plugin caches. Ensure SVG/PNG asset loading is not blocked by security headers.
GeoIP detects wrong country on local test Localhost IP (127.0.0.1) has no geographic location. Test on a live staging or production URL with a public IP address.
Form fails validation on valid national numbers Leading zero conflict in international dialing. Enable the Auto-strip leading zero option in the field settings for countries like the UK, Australia, and Italy.

Frequently Asked Questions (FAQ)

Does this add-on require an external paid GeoIP service?

No, the add-on includes a built-in GeoIP lookup engine that requires zero third-party subscriptions or API keys.

Can I search for countries by name or dial code in the dropdown?

Yes, the flag dropdown includes a real-time search box allowing users to quickly filter countries by typing their name or dial code.

Is it compatible with Twilio and WhatsApp automation?

Yes. By selecting the E.164 storage format, phone numbers are formatted identically to what Twilio, WhatsApp Business API, and SMS providers require.

Does it support multiple phone fields on the same form?

Yes, you can have separate phone fields (e.g., Primary Mobile and Work Phone) on the same form with independent country settings.

Does it work inside multi-page forms and conversational forms?

Yes, the input mask re-initializes seamlessly across multi-page navigation and conversational Gravity Forms layouts.

Ready to Supercharge Your Workflow?

Eliminate invalid phone numbers, automate flag selection by IP, and capture standardized E.164 numbers effortlessly.

Get Gravity Forms International Phone Number Mask Input →

Still need help?

Our support team answers tickets every day, usually within a few hours.

0
0
Your Cart
Your cart is emptyReturn to Shop
🔥 FREQUENTLY BOUGHT TOGETHER
Complete Combo & Save 40%!
ITEM IN YOUR CART
Gravity Forms Klaviyo Add-on
$39.00/yr
+
🎁 RECOMMENDED ADD-ON SAVE 40% OFF
Original Price: $39.00/yr
Bundle Special Price: $23.40/yr