0151 355 4555

International Forms

You may have a drop-down list of countries as part of your company information entry forms. Because the business profiles service only provides UK data, the Ajax Company Auto-Complete script will disable the auto-complete functionality when a country other than the UK is selected.

To use this functionality, just set the expected Country option to the value that must be selected in this drop down list before the auto-complete functionality is enabled.

<select id="country">
  <option value="AF">Afghanistan</option>
  <option value="AX">Åland Islands</option>
  ...
  <option value="GB">United Kingdom</option>
  <option value="US">United States</option>
  ...
</select>

<script type="text/javascript">

new data8.companyLookup(
    [
        { element: 'company', field: 'organisation' },
        { element: 'number', field: 'companynumber' },
        { element: 'address1', field: 'line1' },
        { element: 'address2', field: 'line2' },
        { element: 'address3', field: 'line3' },
        { element: 'city', field: 'town' },
        { element: 'county', field: 'county' },
        { element: 'postcode', field: 'postcode' }
    ],
    {
        // Change this to your own Ajax key
        ajaxKey: 'your-ajax-key',
        expectedCountry: 'GB'
    }
).show();

</script>