Overview
CustomQuestions (CQ) allows you to create new survey question experiences, and reuse them.
Each custom question consists of two main parts:
-
CQ runtime component (package in-survey ResponsiveRendering (RR) question customization as reusable component).
-
CQ settings page (custom per-question settings available in SurveyDesigner ("Custom settings" tab on question details page) and available in CQ runtime).
The CQ developer must specify the base Confirmit question type (for example, SingleForm). The Horizons application then uses the base type to determine how to store the CQ answers in a database, and which question RR model will be used in the runtime component.
The Web developer can create the CQ and upload the CQ bundle to Confirmit.
CQ zip bundle
The CQ bundle is a zip archive containing a question metadata json file and a number of static files (html/js/css) which will be stored and hosted by FileLibrary. One CQ bundle contains one CQ.
The bundle contains three elements:
Key differences from Flex (Confirmit Question Extensions):
-
Client-side only rendering
-
RR API for runtime customization
-
Support for SD and Askme/Capi mobile apps
-
Static resources hosted from the FileLibrary.
Limitations
-
Can be used only in RR surveys
-
Can only be added or its settings changed in SD
-
Cannot have server-side logic
-
FileLibrary limitations (file size, file extensions, per-company quotas).
Custom Question templates
-
Static files - Basic but fully functional template. Contains only required pieces.
-
NodeJS pipeline - Out-of-the-box support for Dev Mode, JS code transpilation, and CQ zip bundle generation.
Notes
-
A metadata.json file is required for any custom question.
-
The custom question folder structure is defined by the metadata.json; the structure generated by templates is a reasonable starting point.
-
Autogenerated files which have "// DO NOT MODIFY THIS FILE" content (for example, custom-question-bridge.js) should not be modified by the user.
-
Custom questions use unique global identifiers (GUID) generated on the client, so the same custom question will have the same ID on different SaaS environments. Note that surveys with custom questions store only references to them (similar to table lookup and hierarchies), so when you import/export surveys you must also import/export any associated custom questions.
-
Currently you can only implement Custom Questions with default rendering disabled. This is the same effect as when you have "Disable default rendering" enabled in the layout’s question skin’s settings.
-
The CQ zip bundle must have the metadata.json file in the root.
-
To update the custom question, upload the zip bundle again. Changes are applied immediately to surveys without relaunch, but note that the original layout may be cached by the browser.
-
The survey package stores the Custom Question reference and its Runtime dependency links, so if you change dependencies then you need to relaunch the survey.
-
All files you upload as custom questions are available to anyone via the FileLibrary with no access restrictions, so do not put sensitive data there.
Development
See the Getting Started, Runtime Component, Settings Page and Dev Mode topics for details.