Last updated
Last updated
Unlike most answers, a default address answer value is stored as an object
, since it contains multiple parts.
Need only the town / city? See the question type.
If you would like to access one of the parts of the address in a string , you may use the get
template function.
Given the above example, a template like:
Would render:
When this option is enabled, Formsort will provide a single input field for the user address, rather than distinct input fields for street address, city, state, and zip.
The payload for a single field address is a little different than the default, since the data type is considered string
instead of an address object
. This means the address details will come in as one "raw"
property in the address object.
If you enable International?, then responders will be allowed to choose the country of their address. The saved address will contain the country
that was selected.
When international addresses are enabled, you can set a default country using Default country.
If you'd like to pass an address into the flow for your user, here is an example of the syntax required for the address component at the top of this section. Notice each [field]
corresponds to an object key from the example.
You can set all the address fields, or just the fields you have (or want to use).
https://your-flow-url.com?my_address[address_1]=213+Main+St&my_address[address_2]=Apt+17&my_address[city]=Kansas+City&my_address[state]=MO&my_address[postal_code]=64116
Since the Single-Field address string will require commas, you may have to URL encode the address before passing it in as a value for the parameter.
https://your-flow-url.com?my_address[raw]=123%20Main%20St%2C%20Apt%2017%20Kansas%20City%2C%20MO%2C%2064116
If you are restricting referrers and/or embedding your Formsort flow, make sure to add flow.formsort.com
(which is where your flow will be hosted) to the list of allowed referrers in the Google API console, in addition to any custom domains on which you are hosting your flows.
Whitelisting flow.formsort.app
may be necessary for use of the Places API in the Live Preview as well!
When enabled, the address answer will also contain a raw
field which stores the raw string that was entered by the user.
This feature is only available for addresses in the United States.
See for more information on passing answers in to a flow.
Addresses are sometimes tedious to type, so you can use the to auto-complete addresses, by providing your API key.
When Validate addresses (US only)? is enabled, will be used to verify that the address is a valid US mailing address, once you provide your API credentials for USPS.
Collects an address, including street, state and postal code.