Add a car make and model dropdown to Webflow
One Code Embed element inside your form, and a test submission to make sure the vehicle arrives with it.
Webflow is a good fit for the picker: its Code Embed element takes HTML and script, and it can sit right where the vehicle fields belong in your form. The one thing to confirm is that your form submissions include the vehicle, and that takes one test.
What you get
A make select, a model select that fills when someone picks a make, and a year select, from the official vehicle registers behind the VehiclesDB dataset. Cars by default; motorcycles, vans and trucks are an option. Someone picks Toyota, then the Corolla, and your submission says so in the same spelling every time.
The block
Paste where the vehicle fields go
<label for="vehicle-make">Make</label>
<select id="vehicle-make" name="make"></select>
<label for="vehicle-model">Model</label>
<select id="vehicle-model" name="model"></select>
<label for="vehicle-year">Year</label>
<select id="vehicle-year" name="year"></select>
<script src="https://cdn.jsdelivr.net/npm/make-model-dropdown@0.4.1"></script>
<script>
VehiclesDropdown.attach({
make: "#vehicle-make",
model: "#vehicle-model",
year: "#vehicle-year",
kind: "car",
order: "popular",
includeOther: true,
otherLabel: "Other / not listed",
placeholderMake: "Make",
placeholderModel: "Model",
placeholderYear: "Year",
source: "dataset"
})
</script>
This block works as it is, with no key and no account: it reads the open dataset and shows a small credit line under the picker, which free use requires. Paid plans can remove the credit line.
Want another language, vehicle kind or country? Choose your options and copy your own block. A free key adds make logos and puts the most registered makes at the top of the list.
Add it to your form
- Open your site in the Designer and select the Form Block that should ask for the vehicle.
- Open the Add panel and drag a Code Embed element into the form, where the vehicle fields should go (above the submit button).
- Paste the block into the code editor, then save and close it.
- Publish the site. Webflow shows a placeholder for scripts in the Designer, and custom code doesn't run in the expanded canvas view; you see the picker in preview, and visitors see it once the site is published.
Webflow's help center states the plan requirement for the Code Embed element: a Core, Growth, Agency or Freelancer Workspace, or a site with an active Site plan (at the time of writing). An embed holds up to 50,000 characters, far more than this block needs.
How the vehicle reaches your submissions
Webflow sends a form's fields when they sit inside the Form Block, and identifies each one by its name. The picker's fields are called make, model and year, and their values are short lowercase names, such as volkswagen, golf and 2019.
Webflow's documentation covers its own form elements, not fields inside a Code Embed, so it doesn't promise the picker's fields are captured. Check it once with a real submission (below). If the vehicle doesn't arrive, tell us and we'll help you find another way in.
If you export your site to host it elsewhere, Webflow doesn't process form submissions at all; your own form handler receives the fields instead.
Check that it works
- Open the published site in a private window.
- Pick a make, a model and a year.
- Submit the form, as a customer would.
- In your site's form submissions, look for
make,modelandyearwith the vehicle you picked.
The picker is done when that test submission arrives with the vehicle in it, not when the lists appear.
Common problems
- The picker doesn't show in the Designer. Expected: scripts show as a placeholder there. Preview or publish to see it.
- It shows in preview but not for visitors. Custom code goes live only after you publish.
- The Code Embed won't save. Check the plan requirement above.
-
Nothing loads, and the browser console mentions a Content Security Policy.
Your site sends a policy that blocks scripts from other sites. Allow
https://cdn.jsdelivr.netfor scripts and connections, andhttps://vehiclesdb.comfor connections if your block has a key. -
You use a block with a key.
A key only works on the websites it is locked to. Keys made on the
embed page are locked to your site and also work on your own computer
(
localhost) for testing. To test on a staging or preview address, add it to the key's websites in Settings first.
Building on another platform? The make and model dropdown page lists every guide, and the booking forms guide explains what the picker does for garages and tyre shops.
Questions people ask
Which Webflow plans can use the Code Embed element?
Webflow's help center says the Code Embed element is available with a Core, Growth, Agency or Freelancer Workspace, or on a site with an active Site plan. Check the current wording there before you buy a plan for it.
Why don't I see the picker in the Designer?
Webflow shows a placeholder for script tags in the Designer. The picker appears when you preview or publish the site, and it only works for visitors once the site is published.
Does Webflow save the make and model with the form?
Webflow's documentation doesn't promise that fields inside a Code Embed are captured, so send one test submission and look for the make and model in your site's form submissions before you rely on it.
What arrives in the submission?
Fields called make, model and year, with short lowercase values such as volkswagen, golf and 2019.