Formulayt forms can enhance data collection by integrating with Google Places API to provide location autocomplete functionality. This allows users to quickly search for and select businesses or addresses, automatically populating form fields with accurate location data.


The integration supports two search types: business establishments (companies) and standard addresses, each providing relevant location information to enrich your form submissions.



Integration requirements

Google Maps API setup

To use Google Places with Formulayt, you'll need to obtain a Google Maps API key. Follow these steps:


  1. Sign into your Google Cloud Console
  2. Create a new project or select an existing one
  3. Enable the Places API for your project
  4. Navigate to APIs & Services > Credentials
  5. Click Create credentials and select API key
  6. Copy your API key for use in Formulayt


Formulayt configuration

Once you have your API key, configure the integration in the Apps area:


  • API key: Your Google Maps API key
  • Search type: Choose between:
    • Company: Search for business establishments
    • Address: Search for residential addresses
  • Target field: Select which form field should trigger the Google Places search



Field mapping

Google Places provides extensive location data that can be mapped to your Formulayt form fields. The available fields vary based on your search type selection.


Suggested fields

Some fields are computed from the raw Google Places data:


  • Address Line 1: Combines street number and route into a single address line
  • Address Line 2: sublocality_level_1
  • Town/City: Uses postal town if available, otherwise falls back to locality
  • Postal Code: postal_code
  • State: administrative_area_level_1 - Long name
  • State Code: administrative_area_level_1 - Short name 
  • Country: country - Long name
  • Country Code: country - Short name


Company exclusive fields

When searching for business establishments, the following additional fields are available:


  • Business name
  • Phone number (formatted)
  • Website URL
  • Business status (operational, closed temporarily, etc.)
  • Rating and review count
  • Price level


Address and company search fields

The following fields are available for both address and company searches:


  • Full formatted address
  • Individual address components:
    • Street number
    • Street name (route) - both long and short names
    • Unit/apartment number (subpremise) - both long and short names
    • City/town (locality) - both long and short names
    • Suburb/district (sublocality level 1)
    • County (administrative area level 2) - both long and short names
    • State/province (administrative area level 1) - both long and short names
    • Postal town
    • Postal code
    • Postal code suffix
    • Country - both long and short names
  • Geographic coordinates (latitude/longitude)
  • Google Place ID



How  it works

  • When a user begins typing in the designated target field, Google Places autocomplete suggestions appear
  • Upon selecting a suggestion, a confirmation dialog displays the selected location details
  • Once confirmed, the mapped fields are automatically populated with the corresponding data
  • Users can cancel the selection to search for a different location



Location biasing

The integration automatically attempts to bias search results based on:

  1. Browser geolocation: If available, results are biased to locations within 10km of the user
  2. Country restrictions: If a country field exists on your form, searches are restricted to that country



Troubleshooting

Autocomplete not appearing

  • Verify your API key is valid and has the Places API enabled
  • Ensure the target field is correctly configured


Missing data in mapped fields

  • Not all locations have complete data (e.g., some businesses may not have websites)
  • Verify field mappings are correctly configured



Need Help?

If you are experiencing issues with the Google Places integration after following these instructions, our technical support team is here to help. Create a new support ticket and we'll assist you with the integration setup and configuration.