External variables
Allow values to be passed into flows, even if not collected in questions
In a typical form flow, you only collect answers from questions that appear within the flow itself.
However, there are many cases where you might want to pass data into a form that would never be provided by the responder directly:
  • Tracking information, such as unique identifiers, account IDs, etc.
  • Configuration variables, which enable or disable certain functionality.
External variables are passed into flows as URL parameters. Consult the URL parameters page for more information on the proper format and other details.
If you're familiar with HTML form semantics, this is the equivalent of a <input type="hidden"> field which is part of a form, but not provided by the user.

Adding External variables

To capture an external variable for a flow, in the Schema tab, select External Variables > Add External Variable, and set the expected name of the parameter in the Answer variable name field.
For example, if a user is being directed into your Formsort flow with a utm_source as a query parameter appended to the URL, the URL will look something like this:{{your_account_name}}/flow/{{your_flow_name}}/variant/{{your_flow_variant_name}}/?utm_source={{example_utm_value}}
In order to capture the value of utm_source ({{example_utm_value}}), you can create an external variable called utm_source. This variable will store the value when the flow loads.
Create an external variable called utm_source. See settings below


Is array

Use the Is array option if the field passed into the flow has an array format. For more information on the accepted query parameter convention, see URL parameters.

Keep in URL if present on load

When a flow is loaded in Formsort, any URL parameters that match any variable defined in the flow will be placed into the variables and removed from the URL. To learn more about that, read about getting data in from URL parameters.
If you would like instead for a variable value to remain in the URL, enable Keep in URL if present on load. This might be helpful if you are matching up campaigns on a URL string, and want to keep things like the utm_source consistent across pages.
Anything in the URL will most likely be recorded by any analytics scripts you include in the integrations, so avoid using this setting for personally-identifying information.

Storing answers in cookies

Another option is to store answers in cookies. In cases where you are collecting more sensitive information, this might be a better option, since you might not want to pass sensitive information unencrypted via URL. In order to do so, you can enable Read/Write in Cookie option.
Configuring a domain is required to store answers is in cookies.

Default value

If a default value is set, if a value is not present when a flow is loaded, the default value will be used.
A common use for this is to define control variables, similar to constants, that govern what parts of a flow are enabled, or function as a setting parameter.

Prevent Editing

By default, external variables pass in as query params can be overridden in the flow. If, for example, zip_code is passed in as a query parameter, but a question then asks the user to enter their zip code to a variable zip_code, the external answer will be replaced by the submitted answer. If you want to ensure external answers passed in as query params are not overriden, enable the Prevent Editing? option.