Address picker
Introduction
Formcrafts has an address picker field that allows users to search for an address and select it from a list of suggestions. This is powered by Google Places API, and can be used to collect accurate address information from your users.
In this guide we will show you how to create an API key in Google, and then add the address picker to your form.
Google offers $200 worth of free API credits each month. When used only with the Places API (New), this would approximately allow you to make 20,000 - 40,000 requests per month.
Create an API Key
Go to the Google Cloud Console ↗.
Click on the project you want to use the API key for (on the top left corner).
In the left sidebar, click on APIs & Services > Credentials.
Click on Create Credentials > API Key.
Copy the API Key and save it in a safe place.
We will now restrict this API key to only work with Formcrafts. This is optional, but highly recommended.
Click on the API Key you just created.
Under Set an application restriction select Websites, and add URL
*.formcrafts.com/*
Under API restrictions, click on Restrict key.
In the search bar, type Places API (New) and select it. If you can’t find the Places API in this list, you need to enable it first via the API Library ↗.
Your API key is now restricted to only work with Formcrafts.
Add the Address Picker field
Now we will add the address picker to your form.
In Formcrafts, open the form you want to add the address picker to.
Click on Add field on the top-left corner of the form editor.
Search for Address and click on it.
If you haven’t already enabled Google Places on your form, you will see a Connect to Google Places button. Click on it. On the popup, enter the API key you created earlier.
Preview
You can now click on the Preview button on the top-right corner of the form editor to test the address picker.