Static HTML Country List or CountriesDB Widget?
A short HTML country list can be all you need for a form that serves three markets. The decision changes when you need a broad list, translated labels or a second select that follows the country. Every copied list then becomes another place to review changes.
The website form guide has the shared widget snippet and setup if you choose the maintained list.
Pick the right approach for your form
1. Use a static list for a small, fixed set
If the form serves only a few markets and the choices are part of your business policy, list those options directly. Keep the value stable and the label readable. This example intentionally offers two countries.
<label for="fixed-country">Country</label>
<select id="fixed-country" name="country" required>
<option value="">Select country</option>
<option value="CA">Canada</option>
<option value="US">United States</option>
</select>
2. Use the widget when country data is becoming maintenance work
A maintained widget is useful when you need wider coverage and regions that change with the chosen country. Create a CountriesDB project, generate a public key and allow your form hostname. Put the fields inside the existing form and load the script once.
<script src="https://unpkg.com/@countriesdb/widget@latest/dist/index.js?public_key=YOUR_PUBLIC_KEY"></script>
<label for="country">Country</label>
<select id="country" name="country" class="country-selection"
data-name="country" data-label="Select country" data-preselected="" required></select>
<label for="region">State / province / region</label>
<select id="region" name="region" class="subdivision-selection"
data-country="country" data-label="Select region"></select>
3. Test the trade-off on the published page
Check that the script loads, the choices populate and the submission stores the codes your handler expects. Decide what the form should do if the choices cannot load. If you are replacing a static list, confirm downstream integrations can accept the values the widget emits before you switch.
FAQ
Do I need a developer?
You can paste either example if you control the markup. Get help if you need to update a form handler or map values for a CRM.
What if I need states and provinces?
A static version needs its own region data and change logic. With the widget, add the subdivision select and test it for the countries you serve.
Can I restrict the widget to my markets?
Yes, use the widget filter options and enforce allowed countries in your submission handler.
Which option works without JavaScript?
The static select does. The widget needs JavaScript and access to its data service.