Category Configuration
Contains the configuration of a category.
The configuration of a Category is only part of the Questionnaire Configuration.
See also
configuration.configuration.QuestionnaireCategory
Parent element: |
|
Child element: |
Format
The basic format of the configuration is as follows:
{
# The keyword of the category.
"keyword": "CAT_KEYWORD",
# (optional)
"view_options": {
# Default: "default"
"template": "TEMPLATE_NAME",
# Default: false
"use_raw_data": true,
# Default: false
"with_metadata": true,
# Default: {}
"additional_data": {
"QUESTIONGROUP": ["KEY"]
}
},
# A list of subcategories.
"subcategories": [
{
# ...
}
]
}
See also
For more information on the configuration of its child elements, please refer to their respective documentation:
Also refer to the Example of a Questionnaire configuration.
keyword
The keyword of the category.
view_options
(Optional). An optional object containing configuration options for the view representation of the category.
template: An optional template name. Must be a valid file name with.htmlending in foldertemplates/details/category/.
use_raw_data: An optional boolean indicating whether to add the raw category data to the template or not. These values can then be used for example for manual rendering of the category details. Defaults toFalse.See also
configuration.configuration.QuestionnaireCategory.get_raw_category_data()
with_metadata: An optional boolean indicating whether to add the metadata of the current Questionnaire to the template or not. Defaults toFalse.
additional_data: An optional object containing the keywords of questiongroups and questions from which additional data is to be collected.Example:
{ "qg_1": ["key_1"] }
form_options
helptext_length(int): Overwrite the default length (number of words) of the helptext shown initially (without the “See more” button).
numbering(str): An optional numbering of the category.
subcategories
A list of Subcategory Configuration.