Yes, there is an alternative to manually adding a long HTML <select>
list of countries in Webflow. Instead of inserting all the country options directly into the embed code, you can use JavaScript to dynamically populate the dropdown, avoiding the 10,000 character limit.
nationality-select
, from the Element Settings Panel.tag section.
Example inline approach (well under limit):
<script> const countries = ["Afghanistan", "Albania", "Algeria", "Andorra", "Angola", "Argentina", /* add full list */]; const select = document.getElementById("nationality-select"); countries.forEach(function(country) { const option = document.createElement("option"); option.value = country; option.text = country; select.appendChild(option); });</script>
countries
array with your preferred country list.<option>
elements directly in HTML, skirting the character limit.If you want cleaner code, you could host the country list in an external JavaScript file (on GitHub, a CDN, or your own server).
Load it via a script tag:
<script src="https://yourdomain.com/countries.js"></script>
Ensure that script appends options to your dropdown using the same logic as above.
Instead of hardcoding every nationality option into Webflow’s Embed code (which risks hitting the 10k limit), use JavaScript to dynamically populate the dropdown from a predefined array or external file. This keeps your embed code minimal and maintainable.