Skip to main content

Custom Postcode Input

You may not want the plugin to create its own postcode input field. Instead, you may wish to use an existing field.

The plugin allows you to define a pre-existing element to accept inputs for your postcode lookup.

To enable this behaviour identify your custom input via the input property.

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

Live Demo

Loading...