This is a lower-level API. Lower-level APIs are not recommended for most projects, and may not be available on all plans. See our page on recommended deployment patterns for more information.
Initialization Option Question Editor API

include_options

Combination of object key and array values to add option(s) to dropdown input.

The key is the attribute path of the property. See here on how to find attribute paths. If the path has an index in it (e.g. [0]) then just remove that to affect all indexes.

Note: in most cases the dropdowns show all of the specific values which the question renderer supports already, and so adding a new option wouldn't work. E.g. fontsize only supports "small", "normal", "large", "xlarge", and "xxlarge", so adding another entry for say "xxxlarge" wouldn't work as the renderer doesn't know that option.

Note: exclude_options takes precedence, so an option will not be shown if it's included in exclude_options too.

The main use-case for this is to add a custom keypad for symbols for Math question type (see example below), but it could also be used to add additional properties to custom fields. (See example for question_types.[questionTypeName].include_options)

Examples

"base_question_type": {
    "include_options": {
        "symbols": [{
            "label": "Custom keypad",
            "value": {
                "label": "Custom keypad",
                "title": "Init option keys",
                "value": ["M", "\\Lambda", "T", "H", "\\kappa", "\\in", "\\gamma", "\\$", "", "", "", "", "", "", "", "", "", "", "", ""]
            }
        }]
    }
}

Values

Request object key base_question_type.include_options

Type object

This object has the following properties which can be configured.

Versioning

Version added: v2023.3.LTS

Was this article helpful?