Skip to main content

Understanding Automatic Country Detection in Forms

Automatic Country Detection pre-fills the correct country code and flag in Phone fields based on the user’s location, reducing friction and improving form accuracy.

Updated over 2 months ago

Who This Is For / When to Use

Use this feature when your forms collect phone numbers from users in different countries and you want to automatically display the correct country code while still allowing manual selection.


What Is Automatic Country Detection

Automatic Country Detection uses the visitor’s IP-based location to determine which country code should appear in the Phone field.

When enabled:

  • The correct country flag and dialing code are shown automatically.

  • Users can manually change the country if needed.

  • The experience is consistent across desktop and mobile devices.


How Automatic Country Detection Works

  • The system detects the user’s approximate location using their IP address.

  • The Phone field displays:

    • The country flag

    • The international dialing code

  • If the user is on a VPN or proxy, the detected country may reflect the VPN location instead.


How to Enable Automatic Country Detection

Step 1: Open the Form Builder

  1. Go to Sites → Forms.

  2. Click + Add Form or open an existing form.

  3. Choose Start from Scratch or From templates.


Step 2: Add a Phone Field

  1. In the Form Builder, click the + icon to add elements.

  2. Drag the Phone field into your form layout.


Step 3: Enable Country Picker

  1. Click the Phone field in the form.

  2. In the right-hand settings panel:

    • Enable Required (optional)

    • Toggle Enable Country Picker ON


Step 4: Save and Preview the Form

  1. Click Save.

  2. Click Preview to test the form.


What the User Sees

When the form loads:

  • The Phone field shows a flag icon and country code.

  • The flag reflects the user’s detected location.

  • The country can be changed manually from the dropdown.


Supported Behavior and Edge Cases

  • Works on desktop, tablet, and mobile devices.

  • If the user’s IP is masked (VPN or proxy), detection may be inaccurate.

  • Users can always override the detected country manually.


Common Issues and Fixes

Flag not showing in the Phone field
Ensure Enable Country Picker is turned on for the Phone field.

Wrong country detected
This can occur when users are on a VPN or proxy. Users can manually select the correct country.

Country picker disabled
Only the Phone field supports automatic country detection.


FAQ

How does automatic country detection work?

It detects the user’s location using their IP address and displays the corresponding country code and flag in the Phone field.

Can users change the detected country?

Yes. Users can manually select a different country from the dropdown.

Does this work on mobile devices?

Yes. Automatic country detection works on desktop, tablet, and mobile.

Will this work if the user is using a VPN?

The detected country may reflect the VPN location instead of the user’s actual location. Manual selection is still available.

How do I enable the flag icon in the Phone field?

Select the Phone field in the Form Builder and enable Enable Country Picker, then save the form.

Can I force a default country?

The system defaults to IP detection. If a preferred country option is available in your account, it can be set to prioritize your primary region.

Did this answer your question?