Search
⌃K
Links

Library variables

Built-in answers about the responder's context and state.

Overview of library answers

Library answers allow access to built-in attributes about the responder's environment or context. They allow you to reach into the internals of Formsort, or the responder's browser, and pull out information that may be useful to you.

Available answer definitions

current step id

The ID of the current step (falling back to the current step index if an ID is not set). The Step ID is useful to include if using any analytics integrations, in order to analyze step-level performance. This id can be manually set in the Step Settings.

current step index

The index of the current step, which is the number automatically assigned to the step according to where it is in the flow (e.g. first step is step "0", second step is step "1", etc.). The step index cannot be manually set.

expected redirect url

Where is the user getting redirected?
Will be set even if not currently redirecting: this is where the responder would be redirected 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 responder in?

host

This variable will include the base flow url in the answer payload.

is Android

Is the responder on an Android device?
Useful as a condition for displaying an Play Store link if you have an app.

is iOS

Is the responder on an iOS device, such as an iPhone?
Useful as a condition for displaying an App Store link if you have an app.

is mobile

Is the responder on a mobile device, regardless of manufacturer?

is returning responder

Has the responder been to this flow before?

previous step url

The URL of the previous step, useful for back links.

referrer

The URL that form user arrived from, corresponding to document.referrer.
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.
Take care with collecting the referrer: it may contain personally-identifying information, if the referring page puts user data in its own URL and does not have a Content Security Policy defined.

responder uuid

The responder uuid of the responder.