Home / Documentation / Address Autocomplete / Dynamic Country Filtering for Address Autocomplete

Dynamic Country Filtering for Address Autocomplete

As of version 1.7.2, Address Autocomplete supports dynamic country filtering. When a user selects a country from a dropdown on your form, the autocomplete suggestions automatically filter to addresses within that country only.

How it works

The plugin detects which field in your data population settings is mapped to a country value (e.g., {country:short_name}). It then watches the corresponding country dropdown on your form for changes. When the user selects a different country, the autocomplete results update immediately to show only addresses from that country.

This works automatically — no additional configuration is needed. If your instance has a country field in its data population settings, dynamic filtering is active.

What to expect

  • When the country changes, the address input field is cleared so that suggestions match the newly selected country.
  • Only valid 2-letter ISO country codes (e.g., “US”, “GB”, “DE”) trigger filtering. If your country dropdown uses full country names or other formats, the filtering will not apply.
  • Dynamic filtering works with any form, not just WooCommerce or other one-click integrations.
  • This works in combination with any static country restriction you have set on the instance.