Filter By Country
Display address results that matches the chosen country (England, Wales, Scotland, Northern Ireland, Jersey, Guernsey and Isle of Man )) using queryOptions.
Only addresses with exactly matching Country will be suggested.
- JavaScript
- HTML
AddressFinder.setup({
  apiKey: "ak_test",
  queryOptions: {
      country: "England"
  },
  outputFields: {
      line_1: "#first_line",
      line_2: "#second_line",
      line_3: "#third_line",
      post_town: "#post_town",
      postcode: "#postcode",
  }
});
<form>
  <h1>Address Form</h1>
  <label for="line_1">Address First Line</label>
  <input type="text" id="line_1" />
  <label for="line_2">Address Second Line</label>
  <input type="text" id="line_2" />
  <label for="line_3">Address Third Line</label>
  <input type="text" id="line_3" />
  <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...