×Overview

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

referrer

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}}.

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

Schema

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

Previous
« Customization

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