Omit Company Name
In many countries including the UK, the organisation name will take presidence as the first line of an address if it is present.
By setting removeOrganisation
to true, the plugin will scrub any organisation name from address lines.
note
Note that in instances where the organisation name is the only premise identifier, it will not be removed from an address.
- JavaScript
- HTML
AddressFinder.setup({
apiKey: "ak_test",
inputField: "#input",
removeOrganisation: true,
outputFields: {
organisation_name: "#organisation"
line_1: "#first_line",
line_2: "#second_line",
line_3: "#third_line",
post_town: "#post_town",
postcode: "#postcode",
}
});
<form style="max-width: 450px; padding: 10px;">
<h1>Address Form</h1>
<label for="organisation">Organisation Name</label>
<input type="text" id="organisation" />
<label for="input">Search Your Address</label>
<input type="text" id="input" placeholder="Start typing address here" />
<label for="first_line">Address First Line</label>
<input type="text" id="first_line" />
<label for="second_line">Address Second Line</label>
<input type="text" id="second_line" />
<label for="third_line">Address Third Line</label>
<input type="text" id="third_line" />
<label for="post_town">Town or City</label>
<input type="text" id="post_town" />
<label for="postcode">Postcode</label>
<input type="text" id="postcode" />
</form>
Live Demo
Loading...