To create a form in Webflow with one visible Location dropdown and another hidden email dropdown (used for Zapier or CRM routing), follow these steps:
location
locationEmail
ny@email.com
sf@email.com
</body>
tag in Page Settings > Custom Code, add this inline script:<script> document.addEventListener('DOMContentLoaded', function () { const locationDropdown = document.querySelector('[name="location"]'); const emailDropdown = document.querySelector('[name="locationEmail"]'); const emailMap = { 'New York': 'ny@email.com', 'San Francisco': 'sf@email.com' }; locationDropdown.addEventListener('change', function () { const selected = this.value; if (emailMap[selected]) { // Set the hidden email dropdown to match location emailDropdown.value = emailMap[selected]; // If Zapier/CRM requires it as a selection, update selected option text as well const options = emailDropdown.options; for (let i = 0; i < options.length; i++) { if (options[i].value === emailMap[selected]) { emailDropdown.selectedIndex = i; break; } } } }); });</script>
location
and locationEmail
fields.locationEmail
value, which is pre-populated by the script.Create one visible Location dropdown and one hidden Email routing dropdown in your form. Use custom JavaScript to dynamically set the email value based on the selected location. This setup allows integration with Zapier or a CRM by leveraging the hidden field for logic-based routing.