Metadata

All custom question metadata are stored in the metadata.json file.

This is the only required file in a CQ bundle. Files and folders can have any desired structure, but entry points for design/runtime and runtime dependencies must be registered in the metadata.json file. Files that are not listed in metada.json will still be available from a static file server but will not be injected into the page automatically.

metadata.json

{
  "id": "58c35869-24e6-4b3c-96e7-3e40fede4d77",
 "schemaVersion": 3,
  "name": "My custom question",
  "description": "My description",
 "nodeType": "Text",
  "disableDefaultRendering": true,
  "iconUrl": "design/icon.png",
  "designEntryPoint": "design/index.html",
  "runtimeEntryPoint": {
    "component": "runtime/component.js",
    "deps": {
      "scripts": [],
      "styles": ["runtime/styles.css"]
    }
  }
}

Metadata fields:

Field Required Description Comments

id

required

global unique identifier

Automatically generated by npx tool or CQ client app wizard.

schemaVersion

required

CQ schema version

Controls the server behavior for this CQ. Recommended to use latest schemaVersion available.

name

required

CQ name

Visible in CQ app and in SD add question page.

description

optional

CQ description

Visible in CQ app.

nodeType

required

Confirmit base question type

Value is the same as in survey schema (exported xml survey definition).

disableDefaultRendering

optional

Switches off rendering of the original question on which the custom question is based.

iconUrl

optional

relative path to the CQ icon

Recommended image resolution 48x48.

Can be any image format allowed by FileLibrary (jpg/png/svg etc).

CQ icon is visible in CQ app, in SD questionnaire tree and in SD add question page.

designEntryPoint

optional

relative path to the CQ settings html page

See Settings page.

runtimeEntryPoint.component

required

relative path to the CQ runtime js file

See Runtime component.

runtimeEntryPoint.deps.scripts

optional

relative or absolute paths to the CQ runtime js dependencies

Will be rendered as <script src={dependency}> on the survey page where the CQ is included.

runtimeEntryPoint.deps.styles

optional

relative or absolute paths to the CQ runtime css dependencies

Will be rendered as <link href={dependency}> on the survey page where the CQ is included.