Skip to main content

Attach Multiple Instances

Address Finder can be invoked multiple times to attach multiple instances to your forms.

Each Address Finder instance is isolated and can be configured individually.

The example below illustrates how this can be done two invocations of AddressFinder.setup(). Each with a unique inputField property. This allows the user to search for an address using either the first or second line of the address.

 
AddressFinder.setup({
apiKey: "ak_test",
inputField: "#first_line",
outputFields: {
line_1: "#first_line",
line_2: "#second_line",
line_3: "#third_line",
post_town: "#post_town",
postcode: "#postcode"
}
});
AddressFinder.setup({
apiKey: "ak_test",
inputField: "#second_line",
outputFields: {
line_1: "#first_line",
line_2: "#second_line",
line_3: "#third_line",
post_town: "#post_town",
postcode: "#postcode"
}
});

Live Demo

Loading...