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

Dutch Postcode Autofill in Gravity Forms: Postcode, House Number and Address in One Step

GravityExtra
Dutch Postcode Autofill in Gravity Forms: Postcode, House Number and Address in One Step

If you sell to customers in the Netherlands, you know the moment: a visitor reaches the address part of your form, and has to type a street name, a house number and a place that the postal system already knows from a postcode and a number. In the Netherlands that pair identifies a single address almost everywhere, and Dutch shoppers are used to shops that fill in the rest. Without it, your form looks old, and it collects typing mistakes: Bolstaat, Bolstraat, Bol straat.

This article shows how to give a Gravity Forms Address field that behaviour with a free data source and no API key, what to watch for with Dutch postcodes, house numbers and additions, how to keep the lookup from becoming a privacy or reliability problem, and how to set it up in a few minutes.

Why a postcode and house number is enough in the Netherlands

A Dutch postcode has four digits and two letters, for example 3581 WS. It is much more precise than a postcode in many other countries: together with the house number it names one address in the great majority of cases. The street name and the place name follow from that pair. Dutch websites have offered this for years, so visitors expect it. They type the postcode, the number, and the form does the rest.

The open address register behind it is public. The BAG register of the Dutch government holds every address and building, and the national geodata platform PDOK makes it searchable through a free service called the Locatieserver. You can ask it for the address that belongs to a postcode and a house number, and it answers in plain structured data with the street, the place, the municipality and the province.

What a good postcode field does

Before looking at the tools, it helps to list what a good Dutch address helper should do. These points came out of how real forms break:

  • It accepts the postcode the way people type it: capitals or small letters, with or without a space.
  • It rejects what can never be a Dutch postcode before asking anyone: three digits, a leading zero, or the letter pairs SA, SD and SS.
  • It understands house numbers with letters and additions: 12, 12A, 12-3, 12 bis.
  • It fills the street, the place and the postcode, keeps everything editable, and never blocks the form when the answer is missing.
  • It does not leak your visitors to a third party and does not create a bill when someone scripts it.
A Gravity Forms Delivery address field with a Find your address box above it holding the postcode 3581 WS, house number 10 and addition A, and below it the Street address Bolstraat 10A, City Utrecht, State Utrecht, ZIP 3581 WS and Country Netherlands already filled in
Type a postcode and a house number: the street, city, ZIP and country are filled in, and every field can still be edited.

Setting it up in Gravity Forms

With the Gravity Forms Dutch Postcode Autofill add-on the setup takes a few minutes. Use the native Address field with the International address type, so that the Country drop-down is there. Open the Advanced tab of the field and tick NL postcode lookup. If you also want the province in the State / Province input, tick the second box.

The Gravity Forms form editor with an Address field selected, the Advanced tab open and two checkboxes, NL postcode lookup and Also fill the province
One checkbox per Address field turns the lookup on. The province is optional.

On the page the visitor sees a box above the address inputs with three small inputs: postcode, house number and addition. When the first two are valid and the visitor pauses, the address is looked up and the Street address, City, ZIP and Country are filled in. The street address contains the house number and the addition, so the visitor ends with Bolstraat 10A without typing it.

House numbers and additions without surprises

Additions are where simple lookups fail. A building may have 10, 10A, 10B and 10B-2 all in one postcode, and visitors may type the addition in the house number box instead of in its own input. The add-on splits the two, compares the addition with the register, and writes it the Dutch way: a letter directly after the number, and a numeric addition after a dash. If the visitor types an addition that the register does not know, the street and the city are still filled from the house number, the addition is kept as typed, and a message asks the visitor to check the address.

It is a small thing, but it prevents the worst result: a visitor who typed a correct address being told it does not exist.

Do not make the lookup a gate

A lookup is a convenience. A service can be down, a new building may not be in the register yet, and some addresses are simply special: a floor, a company name, a boat. The rule in the add-on is that the lookup never blocks the form. If the postcode or number is invalid the visitor gets a message with an example. If nothing is found, the message says so and asks the visitor to type the address. If the service is down, or answers with something unexpected, the message says the lookup is not available right now.

All the address inputs stay normal inputs. A visitor can fill them by hand, edit what the lookup wrote, and submit. The box itself is not saved in the entry, so your entries contain the address the visitor confirmed and nothing else.

Privacy and reliability: use your own site as the go-between

The simplest way to add a lookup is to call the public service from the visitor’s browser. It works, but it sends every visitor’s IP address to a third party, it makes your form depend on that service in the browser, and it gives you no control over the volume. This add-on does it differently. The browser sends the postcode and house number to a REST route on your own website. The route checks a security token, checks that the form and the field really use the lookup, applies the limits, looks in the cache, and only then asks the Locatieserver from your server. Your visitor’s IP address, cookies and referrer are not forwarded.

Because the answers are cached, the second customer who lives in the same street and types the same postcode and number costs nothing and is faster. The defaults are sensible: found addresses are remembered for a week, an address that was not found for an hour, and a failed request for 30 seconds so that a struggling service is not hit again and again. Two limits protect you: 30 real searches per visitor per ten minutes and 1,000 per hour for the whole site. Searches answered from the cache never count.

Forms with several addresses, pages and conditions

Real forms are rarely a single address field. A shop has a billing and a delivery address, a booking form has pages, and an order form shows the delivery address only when the customer does not choose pickup. Each Address field with the lookup gets its own box, the values stay when the visitor moves between pages, an AJAX form keeps working after a validation error, and a field that conditional logic hides takes its box with it.

If the Address field has the Country drop-down, the box follows it: it is shown for the Netherlands, hidden when the visitor picks another country, and a successful lookup sets the country to the Netherlands. Customers abroad see the normal address inputs and nothing else.

The settings page

Under Forms, Settings, Dutch Postcode you can change the cache time and the two limits, and press Test the lookup to check that your server can reach the service. The test makes one request for a public example address in Amsterdam and prints what came back. It only runs when you press the button.

The add-on settings in Forms, Settings, Dutch Postcode: the address data section with a Test the lookup button showing a connected message with the test address Dam 1, Amsterdam, and the cache time and search limit fields
One settings page for the data source test, the cache time and the search limits.

A short checklist

  1. Use the Address field with the International type and tick NL postcode lookup in the Advanced tab.
  2. Press Test the lookup on the settings page to make sure your server can reach the service.
  3. Try a postcode with a letter addition, one with a number addition and one that does not exist.
  4. Try the form on your phone: the box wraps to a column and the button takes the full width.
  5. Submit once with the lookup failing, for example by typing a wrong number, and check that the entry still saves.

When you need a different data source

The Locatieserver is free and good for most shops. If you prefer a commercial address service with a service agreement and your own key, a filter lets your own code answer the lookup instead. Return the street, the city and the other fields in the documented array, and the box, the cache and the limits keep working. The add-on does not ship a commercial provider itself, so there is nothing to sign up for.

What it does not do

It does not check that a person lives at an address, and it does not validate addresses outside the Netherlands. It needs JavaScript for the box; without it the address inputs work as normal. It does not promise that the register is complete: new buildings can take time to appear, which is why every field stays editable.

Frequently asked questions

Do I need an API key?

No. The default data source is a free public service. A filter is there if you want to use your own commercial provider.

Will it slow my form down?

The box sends a small request to your own site. A cached postcode answers immediately; a new one waits for the service for at most six seconds, and the form can be used in the meantime.

Does it work with AJAX and multi-page forms?

Yes. Both work, and so do several Address fields in one form and conditional logic.

Is there a Dutch translation?

Yes. The box, the messages and the settings page are translated into Dutch.

Typing a postcode and a number is something every Dutch visitor can do without thinking. With a lookup that is fast, polite when it fails and careful with your visitors’ data, the address part of your form stops being the part people abandon.

Let your Dutch customers type a postcode and be done

See the Dutch Postcode Autofill add-on

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