Add a searchable country selector to any form input
Turns any text input into a filterable country dropdown. Search by name, select with a click or keyboard, and submit only the country name to your form. No external requests. No dependencies.
Webflow has no built-in country selector. Building one from scratch means sourcing a country list, writing search and filter logic, handling keyboard navigation, managing dropdown positioning, and ensuring the submitted value is clean and consistent - all in custom JavaScript. Most solutions reach for a third-party library that adds unnecessary weight, external dependencies, and in many cases cookies or tracking.
The Fractional Country Selector Kit solves this with a single lightweight script and a single custom attributes applied directly in the Webflow Designer.
Here is what you need to know:
- The Fractional Country Selector Kit works by turning any standard text input inside a Webflow form into a searchable country selector. As the user types a filtered dropdown appears beneath the input showing matching countries. The country list is bundled directly into the kit - no external API calls, no runtime dependencies, and no risk of a third-party service going down and breaking your form.
- Search is prioritised intelligently. Countries whose names start with the query appear first, followed by countries whose names contain the query anywhere. Typing
frshows France at the top before any other contains matches. - Only the country name is ever submitted. No flag emogi, ISO code, or anything else is ever added to your form. Your Zapier flows, Make automations, and Airtable integrations receive exactly what they expect.
- Flags and ISO codes are optional display elements in the dropdown. Enable or disable each independently with a single attribute. Flags are generated entirely from Unicode - no image requests, no external assets.
- Keyboard navigation is fully supported. Arrow keys move through the dropdown, Enter selects, and Escape closes it. The kit is accessible by default.
- Two built-in dropdown themes are available for use - light and dark - controlled by a single attribute. Both use consistent padding, border radius, and hover states so the dropdown looks intentional out of the box regardless of which theme fits your site. If you do not add a theme attribute, the kit will default to the light theme.
- Multiple instances work independently on the same page. A form with a billing country and a shipping country picker each operates completely in isolation. The 'Target' attribute creates the indidivual instance.
- The Fractional Country Selector Kit is fully GDPR, CCPA, and PIPEDA compliant. It sets no cookies, makes no external requests, and collects no personal data of its own.
Add this <script> inside the <head> tag of your page or project
This script is the universal script: you only need to include it once, even if you have multiple instances on the page.
<!-- This script is to add a searchable country picker to a Webflow form - Managed by Fractional Creative -->
<script data-fc="country-picker" data-fc-version="1.0.0" data-fc-consent="essential" src="https://cdn.fractionalcreative.io/kits@1/kits.js"></script>Add this required custom attribute

Click the form input you would like to be a country selector and add the custom attribute in this step. This will automatically set the form input to country selector: Light Mode.
The kit does not restrict any Webflow elements you have added (ie: required, etc) and will automatically pull the font from your input.

Some sites need a dark mode, and now its as easy as adding a single attribute to get what you need! Simply add the attribute in this step and the country code will use our native dark theme.

Hide the country flags when a user is searching. The default is to show the flag.

Hide the country code when the user is searching. The default is to show the code.
Without the Kit
With the Kit
Everything you’re probably wondering.
No. The complete country list is bundled directly inside the kit. There are no external API calls and no runtime dependencies. The dropdown works entirely from local data on every page load. You will however, need internet.
Only the country name - for example France or New Zealand. No flag emoji, no ISO code, and no extra characters are ever written to the input. Your form integrations receive a clean consistent value every time.
Nothing is written to the target input. The kit only writes a value when the user explicitly selects a country from the dropdown. Partial text that has not resolved to a selection is ignored. If the user clears the visible input the hidden target input is also cleared. Therefor, if you really need the country in the right formatting you can make your field 'required' and the kit will handle the rest.
Yes. Both are controlled independently with attributes. Set fc-country-flag="false" to hide flags and fc-country-code="false" to hide ISO codes. Both default to showing if the attributes are absent.
Flag emoji are generated from Unicode regional indicator characters and display correctly on macOS, iOS, and Android. On Windows flag emoji are not supported natively and may display as two letter ISO codes instead — for example FR rather than 🇫🇷. Since flags are a display-only feature in the dropdown and never submitted with the form this does not affect functionality.
Use fc-country-theme="light" for sites with light backgrounds and fc-country-theme="dark" for sites with dark backgrounds. Light is the default if the attribute is absent. Both themes include background colour, border, padding, border radius, hover states, and a subtle shadow so the dropdown is readable and polished out of the box. The font will pull from your form input font.
Yes. Each instance is completely isolated. A form with a billing country and a shipping country picker each has its own dropdown, its own search state, and its own hidden target input. Opening one dropdown does not affect the other.
Yes. Mark the target input as required in Webflow and the form will not submit until a country has been selected. Since the Fractional Country Selector Kit only writes to the input on explicit selection an empty input correctly prevents submission if the user has not chosen a country.
Yes. Arrow keys move through the dropdown items, Enter selects the focused item, Escape closes the dropdown, and Tab closes the dropdown and moves focus to the next field. The kit is keyboard accessible by default.
The visible input remains a standard text input. The form continues to function normally - users can still fill in and submit other fields. The Kit degrades gracefully and never blocks form functionality under any circumstance. However downtime is extremely rare.
Yes. This Kit sets no cookies, uses no localStorage, makes no external requests, and collects zero personal data. No consent prompt is required.
Need more than a Webflow Kit? Hire a Digital Agency.
Fractional Creative is a digital agency. We build Webflow websites, design brands, manage Meta and Google ad campaigns, and build custom automations, and more. Start saving with Fractional services.

