It’s a fact that shorter forms have a higher conversion rate, but in B2B marketing longer forms are needed to capture essential information for lead scoring and lead routing. In this tutorial, I will show you how to use the Google Places API to auto-fill city, state/province, country and postal code/zip code within your Pardot forms. Don’t worry, you don’t need to know how to code to implement this, you just need to know how to copy & paste.

Demo

Once the user starts typing in their company name, the Google Places API returns a list of company names that match. The user can click on their company name which fills out the city, state/province, country and postal code/zip code.

pardot-autocomplete-fields

You can choose to make the geographic fields hidden and Google Places will populate the hidden fields, but given that Google Places might not be able to find the company, it’s best keep the fields visible so the user can enter the correct information.

How to add Google Places to your Pardot form

Add the fields

Add the standard Pardot fields for company, city, state, country and postal code to your form. The company field is required to do the look up, but you can choose to omit any of the geographic fields based on your requirements and it will not affect the functionality of the form.

pardot-adding-fields

Add the auto-fill code

Under Look & Feel in your form, select the below form tab and click the HTML icon.

look-and-feel-pardot-form

Copy & paste this code into the editor.




look-and-feel-pardot-form-code

Note: This is just a basic example of using the Google Places API to pre-fill Pardot form fields. You can also pre-fill street address, company phone number, and website address. If you’re interested in populating this information contact me.

That’s it!

You can test the auto-fill functionality by viewing a landing page that contains the form, or simply by previewing the form.

Questions?

Send them to me via email, send me a tweet @jennamolby, or leave a comment

Author

I'm a Freelance Marketing Operations Consultant With 15 years of experience in Marketing Operations, I’ve worked with a wide range of tools including Salesforce, Marketing Cloud Account Engagement (Pardot), Marketo, and many other sales and marketing platforms. I help teams optimize their tech stacks, improve processes, and get accurate, actionable reporting. Whether it’s setting up your Marketing Automation Platform, building Salesforce reports, managing lead lifecycles, tracking attribution, or integrating your tech stack, I ensure everything is aligned to drive real results.

16 Comments

    • Jenna Molby

      Hi Ayrielle, Yes, the solution still works, but Google Place now charges for access to the API. When this article was written, the API was free for use. Cheers, Jenna

  1. Clare Kelly Reply

    Can you enter a zip/postcode and it pre-populate the address fields Jenna? (p.s. love your work!)

    • Jenna Molby

      Thanks, Clare! Yes, you could do it the reverse way, but you would need to update the JavaScript.

Write A Comment