Interactive Question Option XML

The user options for interactive questions are using XML, to edit the XML click on the settings icon in the bottom right-hand corner of options popup.

Each option creates a JavaScript variable when the iQuest is run, the name of the variable is the same as the name attribute on the option tag

e.g. <option name="btnHeight" creates a variable called btnHeight

Grouping Options
To group options together set each option to have the same group attrbiut, for example
  <option name="btnHeight" type="size" unit="px" value="50" default="50" defaultunit="px" group="Button Size">
  <option name="btnWidth" type="size" unit="px" value="100" default="100" defaultunit="px" group="Button Size">

Option Values
When a variable is created it is given the value set in the value attribue

Option Types
There are number of different option types that can be defined and these have their own specific attributes.


  <option name="btnHeight" type="size" unit="px" value="50" default="50" defaultunit="px" group="Button Size">
    <label lang="en">Button Height</label>
    <descr lang="en">The height of each button displayed.</descr>

The size attribute is used to define the size of an DOM object.  The unit attribute can have the following values

  • px
  • %
  • em


  <option name="btnNumColumn" type="int" value="3" default="3" group="Button Layout">
    <label lang="en">Number of buttons per row</label>
    <descr lang="en">Number of buttons per row, to show all the buttons in 1 row enter 0</descr>

The int option create an integer variable


  <option name="btnColor" type="color" unit="hex" value="#D3D3D3" default="#D3D3D3" group="Button Styling">
    <label lang="en">Button Colour</label>
    <descr lang="en">Colour of buttons before they are clicked.</descr>

The colour option can take hexadecimal color values


  <option name="btnHoverFade" type="boolean" value="true" default="true" group="Button Styling">
    <label lang="en">Fade button on hover</label>
    <descr lang="en">Fade the button background colour when the mouse pointer is over the button.</descr>

Boolean variables have the value true or false


  <option name="btnVerticalAlign" type="choice" value="middle" default="middle" group="Button Text Styling">
    <label lang="en">Vertical alignment of text</label>
    <descr lang="en">The vertical alignment of any text contained within the button.</descr>
   <choice value="top">
     <label lang="en">Top</label>
   <choice value="middle">
     <label lang="en">Middle</label>
   <choice value="bottom">
     <label lang="en">Bottom</label>

The choice variable creates a dropdown list


  <option name="strErrMsg" type="string" value="Please select at least 1 answer" default="Please select at least 1 answer" group="Question Behaviour">
    <label lang="en">Error Message</label>
    <descr lang="en">Error message to show if no answers selected.</descr>

The string variable create a text variable