Click them
From the dashboard, open your live page with the visual mapper and click each field: search box, line 1, town, postcode, UPRN. It saves to your key; no code changes.
Address box · drop-in widget
Type-ahead UK address search on the address field you already have. One pick fills line 1, line 2, town and postcode, and keeps the property’s UPRN for your records. No new form, no build step.
Mark the form, name the fields, paste the script. The dashboard writes this for you with your key in it.
<form data-homedata-automap="true">
<input name="address_line_1">
<input name="address_line_2">
<input name="town">
<input name="postcode">
<input name="uprn" type="hidden">
</form>
<script src="https://homedata.co.uk/js/homedata-address.js"
data-token="wt_your_public_key_here"
data-automap="form[data-homedata-automap='true']"
defer></script>
In the dashboard’s Address search, with the domains your form lives on.
Click them on your own page, or let common input names match themselves.
Suggestions as they type. One pick fills every mapped field.
Pick whichever suits how your form is built. You can switch later without changing the script.
From the dashboard, open your live page with the visual mapper and click each field: search box, line 1, town, postcode, UPRN. It saves to your key; no code changes.
Inputs named address_line_1, town, postcode or uprn (and common variants like city or zip) match themselves.
Set data-input and data-field-* on the script tag with a CSS selector for each field.
| Attribute | Required | Notes |
|---|---|---|
| data-token | Required | Your public key. Works only on the domains you listed. |
| data-automap | Optional | A selector for the form whose inputs match by name. |
| data-input | Optional | The address field to search from, if you map by selector. |
| data-field-line1, -line2, -town, -postcode, -uprn | Optional | Where each part of the picked address goes. -lat and -lng too. |
| data-placeholder | Optional | Placeholder text for the search field. |
| data-debug | Optional | Logs every step to the console while you set it up. |
Every pick fires an event on the input, so your own code can use the address too.
const input = document.querySelector('[name="address_line_1"]');
input.addEventListener('hd:select', (e) => {
const { address } = e.detail; // line 1, town, postcode, UPRN
});
Anywhere a customer types an address you need to be right.
Seven keystrokes and a tap instead of four fields. A postcode that exists, on an address that exists, so fewer parcels come back.
Collect a clean address the first time, with the UPRN alongside, so the record joins up with everything else you hold.
A valuation request, a callback, a viewing: know exactly which property they mean before you pick up the phone.
The pick gives you a UPRN. Hand it to any widget that takes one.
Questions
Typing and suggestions are free. Each address a customer picks costs 1 token (1p), billed to your token balance, and brings back the UPRN and coordinates with the address.
No. It attaches to the address input you already have and writes only into the fields you map. Fields it has no value for, such as county, are left as the customer typed them.
Yes. It is one script tag with no dependencies, and it waits for inputs that render late, so forms built by a framework or a page builder are picked up when they appear.
Three ways. Open your page with the visual mapper from the dashboard and click each field. Or give your inputs common names such as address_line_1, town, postcode and uprn and let it match them. Or set data-field attributes on the script tag.
Yes. It is a public key that only works on the domains you list when you create it, so copying it to another site does nothing.
Pay as you go: 100 tokens = £1. Typing is free; each address picked is 1 token.