Join the Team Forms community

E
R
A
T
C

Address component / Limit address

Last updated last week
K
Katia

Hi everybody,

I would like to limit the address component to 2 or 3 cities in Belgium.

Is it possible?

Thank you in advance.

Katia

E
Erin Dwyer
Marked as solution

Hi Katia,

The address component uses google address autocomplete. This means you can configure the component to constrain the autocomplete results using the "provider options". Here are some examples of how you could use these settings to constrain the available addresses however I recommend having a read on googles official documentation if you need something more specific.


Example 1 - Constrain address autocomplete to Belgium

  1. Open the component settings for the address component and navigate to the "Provider" tab

  2. Locate the Provider Options property and enter the following option in JSON format

JSON
 {
   "componentRestrictions": { "country": "BE" }
 }


Example 2 - Constrain address to specific area using bounding box

  1. Open the component settings for the address component and navigate to the "Provider" tab

  2. Locate the Provider Options property and enter the following option in JSON format

JSON
{
  "bounds":{
    "north": 50.952531,  
    "south": 50.752531,
    "east": 4.452764,
    "west": 4.252764
  }
}


Here is an example of the end result:

Team Forms filtered/constrained address component
View full solution
E
1 comment
E
Erin Dwyer

Hi Katia,

The address component uses google address autocomplete. This means you can configure the component to constrain the autocomplete results using the "provider options". Here are some examples of how you could use these settings to constrain the available addresses however I recommend having a read on googles official documentation if you need something more specific.


Example 1 - Constrain address autocomplete to Belgium

  1. Open the component settings for the address component and navigate to the "Provider" tab

  2. Locate the Provider Options property and enter the following option in JSON format

JSON
 {
   "componentRestrictions": { "country": "BE" }
 }


Example 2 - Constrain address to specific area using bounding box

  1. Open the component settings for the address component and navigate to the "Provider" tab

  2. Locate the Provider Options property and enter the following option in JSON format

JSON
{
  "bounds":{
    "north": 50.952531,  
    "south": 50.752531,
    "east": 4.452764,
    "west": 4.252764
  }
}


Here is an example of the end result:

Team Forms filtered/constrained address component