Skip to main content
The Forsta integration produces ConfirmIt-compatible XML that you can upload through the Forsta platform. It translates Questra’s JavaScript expressions into ConfirmIt’s f() scripting API, uses native shorthand methods like .inc(), .any(), .all(), and .none() for readability, and supports bidirectional import/export.

Question types

Questra blockConfirmIt elementNotes
Text<Info>Static informational content. Markdown is converted to HTML.
Text input<Open>Numeric inputs use NumericType attribute.
Multiple choice (single)<Single>Answer elements nested in <Answers>. Supports dropdown layout.
Multiple choice (multi)<Multi>Answer elements nested in <Answers>. Supports atleast validation.
Matrix (single-select)<Grid>Statements as <Nodes>, scale points as <Answers>.
Matrix (multi-select)<Grid3D>Each statement becomes a <Multi> inside <Nodes>, with <Grid3DAnswers>.
Rank order<Multi RankType="true">Exported as a multi-select element with ranking enabled.
Card sort<Multi>⚠️ Exported as a multi-select question. Cards become answer options.
Input list<Open>Exported as a single open-ended input.
Loop<Loop>Full loop support with nested <Nodes>.

Option groups

Like Decipher, option groups are only wrapped in group elements when a question has multiple groups. Single-group questions place answers directly without additional nesting.

Dynamic option groups

Dynamic option groups are materialized using PrecodeMask scripts. The adapter generates a script that reads the source question’s categories via f().categories() and conditionally shows or hides each materialized answer.

Randomization

When an option group has the randomize flag set, the adapter adds AnswerlistOrder="Randomize" to the question element. Static options within randomized groups receive KeepPosition="true" to anchor them.

Expressions and logic

Questra JavaScript expressions are translated into ConfirmIt’s JScript .NET syntax using the f() API. The adapter emits native shorthand methods where possible, falling back to IIFE (immediately invoked function expression) wrappers only for complex patterns.

Shorthand syntax

For multiple choice questions, the adapter uses ConfirmIt’s native methods instead of verbose IIFE patterns:
Questra JSConfirmIt outputMeaning
q1.some(o => o.value == "x")f('q1').inc('x')Is option x selected?
q1.some(o => o.value == "x" || o.value == "y")f('q1').any('x', 'y')Is any of x, y selected?
!q1.some(o => o.value == "x")f('q1').none('x')Is option x not selected?
q1.value == "x" (single-select)f('q1') == "x"Direct equality without .get().
q1.value (bare access)f('q1').get()Retrieve the current value.
q1.labelf('q1').valueLabel()Retrieve the selected option’s label.
Complex callbacks (e.g., o.value == "x" && o.label == "y") fall back to an IIFE that sets up {value, label} item arrays from .categories() and .categoryLabels().

f() API mapping

JavaScript patternConfirmIt equivalent
q.valuef('q').get()
q.label (TextInput)f('q').text()
q.label (MC/Matrix)f('q').valueLabel()
q.some(o => o.value == "x")f('q').inc('x')
q.some(o => ... || ...)f('q').any('x', 'y')
q.every(o => ... || ...)f('q').all('x', 'y')
!q.some(o => ...)f('q').none('x')
q.lengthf('q').size()
!!q (truthy check)f('q').toBoolean()
q.statement_1 (Matrix row)f('q').item('statement_1')
q[key] (computed access)f('q').item(key)
Object.keys(matrix)f('matrix').domainValues()

IIFE patterns

For array methods that don’t have a native shorthand (.filter(), .map(), .find(), .reduce()), the adapter wraps the expression in an IIFE:
(function () {
  var q1_values = f('q1').categories();
  var q1_labels = f('q1').categoryLabels();
  var q1_items = q1_values.map(function (value, index) {
    return { value: value, label: q1_labels[index] };
  });
  return q1_items.filter((i) => i.value != 'other');
})();
This is generated automatically — you write standard JavaScript in Questra and the adapter handles the translation.

Variable references

Variables are exported as hidden <Open> elements with VariableType="Hidden". Computed variable expressions are placed in <Script> elements that use f('varName').set(...).
FeatureSupport
Conditional navigation<Condition> with <TrueNodes> containing <CallBlock> or <Stop>
Disqualification<Stop> with StopType and optional CompleteText
Survey completion<Stop> element for completion pages
Callable blocks✅ Pages referenced from multiple paths are extracted into <CallableBlock>
Option show/hidePrecodeMask scripts that toggle answer visibility
Navigation logic is expressed through <Condition> elements with <Script> children that evaluate the expression and set a hidden navigation variable. The <TrueNodes> or <FalseNodes> branches then route to the target page.

Import

The Forsta adapter can import existing surveys by parsing the XML and reconstructing the Questra survey model. During import:
  • Question elements (<Single>, <Multi>, <Grid>, <Grid3D>, <Open>, <Info>) are mapped back to Questra block types
  • f() API calls and native shorthands (.inc(), .any(), .all(), .none()) are recognized and converted to JavaScript
  • IIFE-wrapped expressions are unwrapped back to clean JavaScript
  • <CallableBlock> pages are reconstructed as additional survey pages
  • <Condition> and <Script> navigation elements are parsed into Questra navigation rules

Warnings

ConditionSeverityMessage
CardSort block exportedWarningExported as a Multi question with limited fidelity
Unsupported block typeErrorBlock is exported as a placeholder