Type key: switch. Renders an on/off toggle for a single yes-or-no statement. In the editor this is the Switch block.
A question: the question rules apply, and it can sit in a layout row column.
Meta fields
Section titled “Meta fields”The meta fields of this node type are listed in the request body of Replace the draft document, under pages › nodes, in the switch tab.
Example
Section titled “Example”{ "public_id": "nNws", "sort_order": 1, "type": "switch", "meta": { "question": "<span>Send me event updates</span>", "validation": { "required": false } }}Defaults and rules
Section titled “Defaults and rules”- A required switch must be turned on before respondents can continue.
default_valueis a boolean;truerenders the switch on.placeholderis accepted but not shown to respondents.