Documentation Index
Fetch the complete documentation index at: https://docs.declarativeforms.com/llms.txt
Use this file to discover all available pages before exploring further.
If you have not created a form before, start with Create a form.
version: 1
title: "Example form"
description: "A comprehensive single_select example."
sections:
- id: section_1
title: "Section 1"
fields:
- id: question_1
type: single_select
label: "Question 1"
options:
# String options use the same label and value.
- "Option 1"
- "Option 2"
- "Option 3"
validators:
- required
- id: question_2
type: single_select
label: "Question 2"
options:
- label: "Option 1"
value: "option_1"
- label: "Option 2"
value: "option_2"
- label: "Option 3"
value: "option_3"
validators:
- required
- type: expression
expression: "data.question_2 !== 'option_3'"
message: "Choose an available option."
- id: question_3
type: single_select
label: "Question 3"
# When allow_other is true, an "Other" option with a free-form text input is shown.
allow_other: true
options:
- "Option 1"
- "Option 2"
validators:
- required
next: done