Webflow sync, pageviews & more.
NEW

How can I create two dropdown selectors in Webflow for a form, one for 'Location' and one for a hidden email response dropdown for Zapier and CRM integration?

TL;DR
  • Add a visible "Location" dropdown and a hidden "locationEmail" dropdown to your Webflow form.
  • Use custom JavaScript to map the selected location to the correct hidden email value for Zapier or CRM routing.

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:

1. Add and Configure the Location Dropdown

  • Open the Webflow Designer and go to the page or form where you want the dropdowns.
  • Drag a Form Block from the Add panel onto the canvas (if not already present).
  • Drag a Dropdown element from the Add panel into the form.
  • Select the Dropdown, go to the Settings panel, and rename it:
  • Name (under Element Settings): location
  • Placeholder (under Input Settings): e.g., "Select a location"
  • Under the dropdown list, add relevant Dropdown Items (e.g., “New York”, “San Francisco”) using the + Add Dropdown Item button.

2. Add and Set Up the Hidden Email Dropdown

  • Add another Dropdown element directly beneath or alongside the location field.
  • Select it and go to the Style panel:
  • Under Layout, set Display: None to hide it from users on the page.
  • Go to the Settings panel and configure:
  • Name: Use something meaningful like locationEmail
  • Placeholder: This won’t show since it's hidden, but set it anyway—e.g., “Email route”
  • Add Dropdown Items for each location’s corresponding email_address. For example:
  • "New York" → ny@email.com
  • "San Francisco" → sf@email.com

3. Connect Location and Email Dropdowns Using JavaScript

  • You’ll need to map the visible Location selection to the corresponding hidden email using custom code.
  • Before the closing </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>
  • This ensures that when the user selects a location, the corresponding hidden email is selected for form submission.

4. Setup Your Form Submission in Zapier or CRM

  • In your Zap trigger (Webflow form submission) or CRM system:
  • Configure it to read the location and locationEmail fields.
  • Route submissions based on the locationEmail value, which is pre-populated by the script.

Summary

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.

Rate this answer

Other Webflow Questions