Skip to main content

Hide Address Fields

Instead of writing address attributes to specific input fields, you can also write out the entire address to a general input like a textarea.

This is achieved by using the OnAddressSelected callback.

Postcode Lookup provides a number of callbacks to enable custom behaviours.

 
PostcodeLookup.setup({
apiKey: "ak_test",
context: "#lookup_field",
hide: ["#address_form"],
outputFields: {
line_1: "#first_line",
line_2: "#second_line",
line_3: "#third_line",
post_town: "#post_town",
postcode: "#postcode"
}
});

Live Demo

Loading...