Addressfinder

The best way to find exact addresses in Australia

  • Skip to Main Navigation
  • Skip to Footer Sitemap
  • Skip to Top
  • About
    • About Us
    • Case Studies
    • FAQ
    • Partners
    • Blog
    • Contact Us
  • Pricing
  • Industries
    • E-commerce
      Collect verified delivery addresses
    • Finance
      Verified address data for KYC and AML
    • Utilities
      Make network connections faster
  • Features
    • Address Autocomplete
      Search verified addresses as you type
    • Bulk Cleansing
      Verify your database of addresses and emails
    • Email Verification
      Collect only valid email addresses
    • Phone Verification
      Verify numbers at the point of collection
    • Geocode Addresses
      Collect addresses and GPS coordinates together
    • Address Metadata
      Get extra data about addresses
    • MORE FEATURES
  • Address Verification
    • Integration Guide
    • Javascript Reference
    • Code Examples
    • API Reference
    • Code Generator
    • International Integration
  • Email Verification
    • Integration Guide
    • Javascript Reference
    • Code Examples
    • API Reference
  • Phone Verification
    • Integration Guide
    • Javascript Reference
    • Code Examples
    • API Reference
  • About
    • About Us
    • Case Studies
    • Frequently Asked Questions
    • Partners
    • Blog
    • Contact Us
  • Pricing
  • Industries
    • E-commerce
      Collect verified delivery addresses
    • Finance
      Verified address data for KYC and AML
    • Utilities
      Make network connections faster
  • Features
    • Address Autocomplete
      Search verified addresses as you type
    • Bulk Cleansing
      Verify your database of addresses and emails
    • Email Verification
      Collect only valid email addresses
    • Phone Verification
      Verify numbers at the point of collection
    • Geocode Addresses
      Collect addresses and GPS coordinates together
    • Address Metadata
      Get extra data about addresses
    • MORE FEATURES
  • Documentation
    • Integrations
      • Magento
      • WooCommerce
      • Hubspot
      • Salesforce
      • Shopify Plus
      See all integrations
    • Address Verification
      • Integration Guide
      • Javascript Reference
      • Code Examples
      • API Reference
      • Code Generator
      • International Integration
    • Email Verification
      • Integration Guide
      • Javascript Reference
      • Code Examples
      • API Reference
    • Phone Verification
      • Integration Guide
      • Javascript Reference
      • Code Examples
      • API Reference
  • Login

Addressfinder integration instructions for external Hubspot forms

If you need to add Addressfinder to a Hubspot-hosted form, you should read the Integration instructions for Hubspot forms.
View a live demo of an externally embedded Hubspot form.

What is the Addressfinder embed for external Hubspot forms?

The Addressfinder HubSpot address verification external form embed adds a predictive autocomplete to the address fields within your externally hosted HubSpot forms.

Installation Instructions

  • These instructions will show you how to add the Addressfinder autocomplete to an externally hosted Hubspot form. Your form should already be working well - just with manual address entry. We will enhance this form to integrate the Addressfinder widget, and enable autocompletion of verified addresses.

Before you start

  • Before adding address autocompletion to your externally hostes HubSpot form, you’ll need to have the following:
  • 1. An existing Hubspot form, embedded on a web page.
  • 2. The form should already have the following address elements:
    1. Street
    2. Suburb
    3. City
    4. State
    5. Postcode
    6. Country (optional)
  • 3. You’ll need an Addressfinder licence key (any trial account will work fine).
  • 4. Sufficient Hubspot access to edit the settings for website pages. You’ll need edit and publish permissions.

Getting started

  • 1. Log into Hubspot
  • 2. In the menu, navigate to Marketing > Lead Capture > Forms
  • 3. Hover over a form and click Actions > Share. Alternatively, open the form and click Embed
  • 4. Paste the embed code into the HTML module on your external page
  • For more information, see the Hubspot instructions

Taking note of the form field property names

  • 1. Click on the correct form in Marketing > Lead Capture > Forms
  • 2. Click on Edit Form, to see a pannel such as this. Click the pencil icon next to each element
  • 3. This will reveal the property name of each field.
  • 4. Write down each property name like the FORM CONFIG table below:
  • Field label Property name
    Street address address
    City city
    State state
    Post code zip
    Country (optional) country

Preparing the code

  • 1. The HubSpot external embed instruction will lead you to include a Hubspot Javascript snippet in your page.
  • 2. You will need to add the Addressfinder widget configuration to this code.
  • 3. Paste the following Addressfinder config into your hubspot form embed javascript (keeping your own values for the region, portalId and formId).
  •   <script>
      hbspt.forms.create({
        region: "na1",
        portalId: "00000000",
        formId: "11111111-2222-3333-4444-555555555",
        onFormReady: function(form) {
          // **************************************************
          // Addressfinder plugin for Hubspot
          // **************************************************
    
          // STEP BY STEP integration instructions here:
          // https://addressfinder.com/r/docs/plugins/hubspot-external-embed/
    
          var config = {
            // STEP 1: paste in your licence key
            licenceKey: "ADDRESSFINDER_DEMO_KEY",
    
            defaultCountryCode: "AU",
    
            // STEP 2 - update the property names using the values assigned within your Hubspot form
            searchPropertyName: "address", // can be a separate field
            addressPropertyName: "address",
            suburbPropertyName: null,
            cityPropertyName: "city",
            statePropertyName: "state", // region (optional)
            postCodePropertyName: "zip",
            countryPropertyName: null, // optional (will use defaultCountryCode if not present)
            // fullAddressPropertyName: "address", // if required, you can store the full address in a single field
    
            // STEP 3 (optional): customise the addresses returned by updating the address_params values
            // Examples at: https://addressfinder.com/r/docs/widget_code_generator/
            widgetOptions: {
              AU: {
                address_params: {
                  paf: 1
                }
              },
              NZ: {
                address_params: {}
              },
              INT: {
                address_params: {}
              }
            },
    
            // STEP 4: once the plugin is working, you can set debugMode to false
            debugMode: true
          };
    
          if(form.querySelector(`input[name=${config.searchPropertyName}]`)){var e=document.createElement("script");e.src="https://api.addressfinder.io/assets/hubspot/v2/address.js",e.async=!0,e.autoLoadConfig=config,form.appendChild(e)}
        }
      });
    </script>
    
  • 4. At the top of this code, replace the ADDRESSFINDER_DEMO_KEY with your licence key. You can get this key from the Addressfinder Portal after you’ve signed up.
  • 5. Next, update the property names using the table you created (above).
  • 6. If your property name contains any special characters (such as a slash), you need to wrap the value in single quotation marks. For example, addressPropertyName: "'2-577445/street_address'".
  • 7. (optional) You may tweak the address_params values. Use the output from the code generator to tune your addresses for allowed addresses such as PO Boxes, etc.
  • 8. That’s all

Publish and test

  • 1. Wait 30 seconds, reload your page (where the form embed code has been added).
  • 2. The autocomplete popup should display once you start typing into the address field.
  • 3. Selecting an address should see the individual elements being populated into the appropriate fields.

Troubleshooting

  • If you still have the debugMode enabled, then you can view error messages within your browser's Javascript console.
  • The most likely problem is a mis-configuration of the property names. The code above will give you a useful error message if it is unable to find the correct field.
  • If this happens, you should double-check the values you wrote down in the FORM CONFIG table above. Have these values been copied into the code correctly?
  • Still having trouble? Send us an email at support@addressfinder.com.au, and we will have a look. Be sure to include the URL of the page, so we can debug the problem.

Advanced options

Separate search field: some people prefer to use a separate search element for performing the address autocomplete. In this case, specify a different value for the searchPropertyName and addressPropertyName. Then, the autocomplete will be attached to the search field, and the first line of the address metadata will be stored in the address field.
Single address field: some people prefer a single address field, rather than individual fields for each address element. In this case, remove the references to addressPropertyName, cityPropertyName, etc. You only need to set searchPropertyName and fullAddressPropertyName (to the same value).

Next steps

Get Started

Existing user? Get your Licence key from the Addressfinder Portal.

  • Address Verification
    • Integration guide
    • Code examples
    • Widget code generator
    • Best practices
    • Fixing browser quirks
    • Advanced usage
    • Javascript widget reference (NZ)
    • Javascript widget reference (AU)
    • Javascript widget reference (Int'l)
    • Integration guide (Int'l)
  • Email Verification
    • Integration guide
    • Javascript reference
    • Code examples
    • Advanced usage
    • API reference
  • Phone Verification
    • Integration guide
    • Javascript reference
    • Code examples
    • Advanced usage
    • API reference
  • API Documentation (AU)
    • Address Autocomplete
    • Address Metadata
    • Address Verification
    • Location Autocomplete
    • Location Metadata
    • API Errors
  • API Documentation (NZ)
    • Address Autocomplete
    • Address Metadata
    • Address Verification
    • Address Reverse Geocode
    • Location Autocomplete
    • Location Metadata
    • Points of Interest Autocomplete
    • Points of Interest Metadata
    • API Errors
  • API Documentation (INT'L)
    • Address Autocomplete
    • Address Metadata
  • Integrations
    • Magento
    • WooCommerce
    • BigCommerce
    • Salesforce
    • Shopify Plus
    • Hubspot
    • StoreConnect
    • Spiffy Stores
    • Ruby
    • iOS
    • Drupal
    • Microsoft Dynamics 365
    • Vue
    • Gravity Forms
    • React
Addressfinder logo
Addressfinder provides speedy, accurate and dependable address autocompletion at a fair price. Easily integrate our address finder software with your site to start enjoying our address verification, address autocomplete and other address services today.

Sitemap

  • About
  • About Us
  • Contact
  • Blog
  • FAQ
  • Pricing
  • Case Studies
  • Status Page
  • Privacy Policy (Service)
  • Privacy Statement (Website)
  • Terms & Conditions
  • Features
  • Address Autocomplete
  • Address Metadata
  • Bulk Address Cleansing
  • Address Geocoding
  • Email Address Verification
  • Phone Verification
  • International Autocomplete
  • Street, Suburb & Postcode Search
  • Postcode Finder
  • Address Verification
  • Integrations
  • WooCommerce
  • BigCommerce
  • Shopify Plus
  • Magento
  • Salesforce
  • Spiffy Stores
  • iOS
  • Ruby
  • HubSpot
  • StoreConnect
  • Drupal
  • Microsoft Dynamics 365
  • Vue
  • Gravity Forms
  • React
  • API Documentation
  • Address Autocomplete
  • Address Metadata
  • Address Verification
  • Email Verification
  • Phone Verification
  • API Errors
  • NZ API specs
  • International APIs
  • Widget Documentation
  • Integration Guide
  • Javascript Reference
  • Code Examples
  • Widget Code Generator
  • International Integration Guide
  • Email Integration Guide
  • Phone Integration Guide
Addressfinder is also available in New Zealand
Terms and Conditions
Copyright © 2023 Addressfinder, New Zealand