🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!
Guides & Tutorials October 26, 2026

How to Add a Vehicle Selector and VIN Decoder to Gravity Forms

GravityExtra
How to Add a Vehicle Selector and VIN Decoder to Gravity Forms

Ask a visitor to type the make, model and year of their car into a form and you will get “Chevy”, “chevrolet”, “Chevorlet” and “chev” in the same column by lunchtime. Ask for a VIN and you will get seventeen characters with the odd letter O where a zero should be. For a trade-in quote, a service booking, an insurance form or a parts request, the vehicle is the most important thing on the form and the hardest to get clean. This tutorial shows how to fix that in Gravity Forms with a cascading Year, Make and Model picker and a VIN decoder, both powered by a free government dataset and running on your own server.

Why a vehicle picker beats a text box

There are two ways a visitor can tell you their vehicle, and both work better as a guided choice than as free text. The first is to narrow it down: the year, then the make, then the model. When each step offers only real options, the answer is always a real vehicle, spelled the one correct way, ready to group and report on. The second is the Vehicle Identification Number. A VIN is stamped on every car and printed on the insurance papers, and it encodes the make, model, year, body style, engine and more. If the visitor can read it off, a decoder can fill in the rest. Offer both and the visitor uses whichever is easier for them.

The data behind both methods is the NHTSA vPIC dataset, a United States government open dataset of vehicles and their specifications. It is free, it needs no account and no API key, and it is the same source many commercial vehicle tools are built on. The challenge is not the data; it is wiring it into a form without slowing the page down or exposing your site to abuse. That is what the Gravity Forms Vehicle Selector Premium Add-on handles.

This tutorial uses the Gravity Forms Vehicle Selector Premium Add-on. The full setup reference, with every field option, is in the Vehicle Selector documentation.

What you will build

By the end of this guide your form will have a Vehicle Selector field, where the visitor picks a year, then a make, then a model from dropdowns that fill in from each other; and a VIN Decoder field, where the visitor types a 17-character VIN, presses a button, and watches the make, model, year, body class and other details drop into the form. Every lookup will run through your own WordPress site, the answers will be cached so the dataset is asked only once per make, year or VIN, and a per-visitor rate guard will keep any one browser from hammering the lookups.

Step one: install and activate the licence

Upload and activate the add-on from the Plugins screen, then open Forms, then Settings, then Vehicle Selector, and activate your GravityExtra licence key. Until the licence is active the lookups stay off, so the dropdowns will not fill. On the same screen you will find three options for the lookups, and the defaults suit most sites.

The Vehicle Selector settings screen in Gravity Forms: the licence box, the cache hours, the lookups-per-minute rate guard and the VIN check-digit option
The settings: the licence, the cache length, the rate guard and the optional VIN check.

The cache option sets how long a make or model list is kept before it is fetched again, from one hour to a week. Model lists change only when new cars come out, so twelve to twenty-four hours is a sensible balance between freshness and speed. Decoded VINs are cached for a day. The rate guard sets how many lookups one visitor can make in a minute; answers served from the cache do not count against it. The VIN check digit option, when turned on, refuses a VIN that fails its built-in check before any lookup, catching most typos at the door.

Step two: add the Vehicle Selector field

Open the form you want to add the vehicle to. In the editor, open the Advanced Fields group and add the Vehicle Selector field. That is all it takes. On the published form the field shows three dropdowns. The visitor chooses the year first; the make dropdown then fills with the makes in the dataset; after a make is chosen, the model dropdown fills with the models for that make and year. The three choices are stored together on the entry as a single value such as “2018 Toyota Camry”, which is easy to read in the entry list and in exports.

Because it is an ordinary Gravity Forms field, you can mark it required, show or hide it with conditional logic, and place it anywhere in the form. The visitor never waits for a slow third-party widget, because the choices come from your own server, usually from the cache.

The Gravity Forms editor with a Vehicle Selector field and a VIN Decoder field, plus text fields marked with the gfvs CSS classes
Both fields added in the editor, with plain fields ready to receive the decoded details.

Step three: add the VIN Decoder and choose what it fills

Add the VIN Decoder field from the same Advanced Fields group. On the published form it shows a box for the VIN and a Decode VIN button. Now decide which details you want the decoder to fill in, and add a field for each one. A Single Line Text field works well for most. Give each of those fields a CSS class in Appearance, then Custom CSS Class, naming the detail you want it to hold. For the make, use the class gfvs-make; for the model, gfvs-model; for the year, gfvs-year. The decoder can also fill the trim, series, body class, vehicle type, number of doors, drive type, engine cylinders, displacement, engine model, engine power, fuel type, transmission style, weight rating, plant country and manufacturer, each with its own gfvs class.

You only add the fields and classes for the details you care about. A quote form might fill just the make, model, year and body class; a parts form might add the engine and drive type. When the visitor presses Decode VIN, the add-on reads the VIN, decodes it on your server, and sets each marked field to its value. Because it only sets the value, Gravity Forms treats the result like something the visitor typed, so required rules, conditional logic and calculations keep working.

The published form with the Year, Make and Model dropdowns and a VIN box, with the make, model, year and body class filled in after decoding
The visitor decodes a VIN and the make, model, year and body class fill in at once.

Understanding the VIN check

A Vehicle Identification Number is always seventeen characters. It uses letters and digits, but never the letters I, O or Q, which are left out so they are not mistaken for one and zero. The ninth character is a check digit: a value worked out from the other sixteen using a fixed set of weights, so a single typo almost always breaks it. The add-on cleans what the visitor types by upper-casing it and stripping spaces and dashes, then checks the length and the characters. If you enabled the check-digit option, a VIN whose ninth character does not match the computed value is rejected before any lookup, which stops most typos from wasting a request. The same length and character check runs again when the form is submitted, so a malformed VIN can never be stored.

Speed, privacy and safety

Three design choices keep the feature fast and safe. First, every lookup runs on your server, not in the visitor’s browser; the browser asks your WordPress site, and your site reads the dataset. That means the dataset host is never exposed to the public and cannot be called directly from a page. Second, the make and model lists and each decoded VIN are cached, so a busy form asks the dataset once per make, year or VIN and serves everyone else instantly. Third, a per-visitor rate guard limits how many fresh lookups one browser can trigger in a minute, so a script cannot turn your form into a firehose against the dataset.

On privacy, the only thing sent to the dataset is the make, year or VIN needed for the lookup. A VIN describes the vehicle, not the owner, and no name, e-mail or address ever leaves your site for the lookup. The add-on also restricts itself to a single dataset host, so nothing a visitor types can redirect a request somewhere else.

Putting it to work

A trade-in valuation form can ask for the vehicle with the cascade, fall back to a VIN for anyone who would rather type it, and store a clean make, model and year that your team can price without guesswork. A service booking can decode the VIN to pre-fill the vehicle details and shorten the form. An insurance or warranty enquiry can capture the body class, engine and drive type from the VIN so your quote is accurate from the first message. In every case the result is the same: the vehicle data on your entries is consistent, complete and correct, because the visitor chose from real options or read a number off their car, rather than typing a guess.

A few practical tips

Keep the two fields close together on the form so a visitor sees both paths at once and picks the one that suits them. Label the decoded fields clearly, for example Make, Model and Year, so the result reads well in the entry and in any notification. If you only want those fields filled by the decoder, set them to read-only or hidden so a visitor cannot accidentally overtype them. And start with the default cache and rate-guard values; they suit almost every site, and you can always adjust them later once you see how busy your forms are.

Finally, test the form the way a visitor will. Pick a year, make and model and confirm the dropdowns fill as expected, then decode a VIN from a real car and watch the fields populate. Submit the form and open the entry to see the clean, consistent vehicle data you will be working with from now on.

Wrapping up

Clean vehicle data starts at the form. With a cascading Year, Make and Model picker and a VIN decoder, your visitors give you exactly the vehicle they mean, and your entries stay tidy. The data is free, the lookups are cached and private, and both fields behave like any other Gravity Forms field. Install the add-on, add the two fields, mark a few fields with their gfvs classes, and your next enquiry will arrive with the vehicle already sorted.

Get the Gravity Forms Vehicle Selector Premium Add-on and add a Year, Make, Model picker and a VIN decoder to your forms today.

0
0
Your Cart
Your cart is emptyReturn to Shop
🔥 FREQUENTLY BOUGHT TOGETHER
Complete Combo & Save 40%!
ITEM IN YOUR CART
Gravity Forms Klaviyo Add-on
$39.00/yr
+
🎁 RECOMMENDED ADD-ON SAVE 40% OFF
Original Price: $39.00/yr
Bundle Special Price: $23.40/yr