Skip to main content

Enable Full Address Search

You can also enable a full address search, i.e. combine a postcode with house number.

Set strictlyPostcodes to false.

 
PostcodeLookup.setup({
apiKey: "ak_test",
context: "#lookup_field",
// Enable address search
strictlyPostcodes: false,
// Add a custom label
placeholder: "Search for a postcode or address",
// Populate the address if a single match found
selectSinglePremise: true,
outputFields: {
line_1: "#first_line",
line_2: "#second_line",
line_3: "#third_line",
post_town: "#post_town",
postcode: "#postcode"
}
});

Live Demo

Loading...