SurveyFactory Documentation Documentation Multiple Answer Menu template variables
Multiple Answer Menu template variables

Template variables > Multiple Answer Menu

Multiple Answer Menu template variables are defined for each question in your survey that is of type Multiple Answer Menu. These variables are identical to Single Answer Menu template variables. If you are looking for template variables for another question type, please see template variables. This page details the structure of the question template variables so you can know what to expect when designing your templates.

question.
   # Variables in common with all question types
   id
   type = 'MultiSelectBox'
   text
   instructions
   required
   number
   sortorder
   scored
   score
   scoremax
   hidden
   valid
   answered
   inloop[]
   loops.
   template.
   errors[]

   # Additional variables for Multiple Answer Menu question types
   na_atleast
   na_atmost
   f_name
   f_uniqueid

   answerorder
   answers[]
      # Variables for each answer in question.answers[]
      id
      label
      value
      selected
      selectable
      fixedposition
      f_value
      f_selected
      f_uniqueid
      textinput
      tf.
         type
         default
         label
         required
         minlength
         maxlength
         validation
         validation_type
         validation_not
         validation_case
         f_name
         f_value
         f_uniqueid
      template.

   comment_tf
   tf.
      type
      default
      label
      required
      minlength
      maxlength
      validation
      validation_type
      validation_not
      validation_case
      f_name
      f_value
      f_uniqueid
      template.

question.

This document assumes that you have the question object in a variable named question. This is most often achieved in a loop, such as:

[% FOREACH question IN survey.questions; %]

or using a custom template function such as getQuestion:

[% question = getQuestion(id); %]

question.id

Contains the ID # of the question as listed in the survey editor. This is unique across all of your surveys and is used in getQuestion and other custom template functions.

question.type

This variable will be set to 'MultiSelectBox' for a Multiple Answer Menu question type.