Variables and schemas

Answer variable names

Every question that you ask of a user will result in a piece of data captured. To more reliably refer to the data, both in your own systems as well as within formsort, each question's answer is given a variable name by default.

You should update these to something consistent that it not verbose but expresses the semantic meaning of the information collected (for example, first_name is a better-named variable than just name since you may end up collecting multiple names in a flow).

Library answers

Library answers are built in to Formsort, and allow you to access various metadata about the flow that you wouldn't be able to access purely from the questions.

Once they are added into your flow, they will be available just like normal answers.

expected redirect url

Where is the user getting redirected? Will be set even if not redirecting, this is where the responder will be redirected to at any point in the flow.

When the flow is being finalized, this is the same as the URL they were finally redirected to.

Formsort environment

Which environment is the user in?

is mobile

Is the user on a mobile device?

previous step url

The URL of the previous step, useful for back links


The URL that form user arrived from.

May be undefined if the user navigated directly to the flow, or if the referring page does not send the referrer per their Content Security Policy

Using variables in templates

In most labels and text content blocks, you can use references to previously-captured variables to create templated strings. Just look for "See variables..." to browse the variables available to you, or just type a known variable using double-brackets syntax (eg. Hi, {{first_name}})

Formatting variables with template functions

There are a few template functions to help with displaying variables.

To use these, add the pipe character and then the function name in the templated text you're writing. For example, to lowercase a variable called name, you'd write {{name | lowercase}}.

Capitalizes a string (upper case the first letter)
Rounds up a number
Rounds down a number
Gets a value from an object. The key is specified as the second parameter.
Lowercases a string
Rounds a number to the nearest integer
Uppercases a string
Displays a string as US dollars


To see all of the answers that are collected in your flow and may end up in your answer sets, see the Schema tab.

« Customization

  • hello@formsort.com
  • Jobs
  • Security
  • Formsort Inc
    © 2020