How to Show Country Codes and Flags in Gravity Forms Phone Fields
Turn your basic phone field into a smart country selector that gets perfectly formatted numbers, every time.

Collecting phone numbers from a global audience can go sideways fast: wrong formats, missing country codes, total chaos. The fix? GP Advanced Phone Field.
Let’s get this sorcery working for you.
This article requires the Gravity Forms Advanced Phone Field perk.
Buy Gravity Perks to get this perk plus 50 other premium Gravity Forms plugins!
How Does the Country Code Selector Work?
The moment you enable Advanced Phone Field, a sleek country drop down appears at the start of your phone field, complete with a flag for every country. Users can then click, scroll to their country, and select. Simple!

If it’s your first time using Advanced Phone Field, we have a guide that teaches you how to easily set it up.
Quick Country Code Detection
Advanced Phone Field is also smart enough to recognize a country code as it’s being typed. For example, if someone enters +370
, it will instantly display the correct flag for Lithuania.

Tip
Want to make sure all phone numbers entering your database are legit? Check out our article on how validation works on Advanced Phone Fields.
How to Customize the Country Drop Down
Let’s take it a step further by controlling which countries show up in the drop down.
Just head to Forms → Settings → Adv Phone Field.
Take Note: These global settings affect all your Advanced Phone Fields across every form.
Pick Default Starting Points
Advanced Phone Field auto-detects a user’s country by checking their IP address location (using IPinfo). If you want to choose a different starting country, just set a Default Country from the list.

Pick Your Common Countries
The Preferred Countries setting pins your most common countries to the top so users don’t have to search for them.
For example, if we pin the UK and US at the top:

Limit Countries
When you need to limit which countries appear in the drop down, there are two ways:
- Only Include: Build a curated list where only chosen countries make the cut.
- Exclude: Start with everyone and remove undesired countries from the drop down.
Tip
Need all countries to appear on a specific form? Use our Show All Countries snippet to overried your globale rules just for that form.
Time to get global with those phone numbers. 🌎