Skip to content

Instantly share code, notes, and snippets.

@otobrglez
Created December 18, 2025 13:23
Show Gist options
  • Select an option

  • Save otobrglez/ddc3aa09c56cc7d2faf654a02d3691a9 to your computer and use it in GitHub Desktop.

Select an option

Save otobrglez/ddc3aa09c56cc7d2faf654a02d3691a9 to your computer and use it in GitHub Desktop.
id: 001-all-question-types
title: All question types
optionSets:
gender:
- { value: "female", label: "Female" }
- { value: "male", label: "Male" }
- { value: "other", label: "Other" }
- { value: "prefer_not", label: "Prefer not to say" }
yesNo:
- { value: "yes", label: "Yes" }
- { value: "no", label: "No" }
likert5:
- { value: 1, label: "Strongly disagree" }
- { value: 2, label: "Disagree" }
- { value: 3, label: "Neutral" }
- { value: 4, label: "Agree" }
- { value: 5, label: "Strongly agree" }
blocks:
- id: intro
title: First block
pages:
- id: intro
title: Getting started
nodes:
# Basic nodes
- id: greet
markdown: Hello. This is Survey Definition Language (SDL DSL)
type: text
# Different question types
- id: name
label: What is your name?
type: question
- id: age
label: How old are you?
type: number
- type: text
markdown: "You are older than 18 years old."
id: older_than_18
showIf: age > 18
- type: text
markdown: "You are not older than 18 years old."
id: younger_than_18
showIf: age <= 18
- label: What is your gender?
type: radio
id: gender
options:
sources:
- optionSet: gender
- type: radio
id: work_mode
label: "Preferred work mode"
options:
sources:
- inline:
- { value: "office", label: "Office" }
- { value: "remote", label: "Remote" }
- { value: "hybrid", label: "Hybrid" }
- type: radio
id: contact_permission
label: "May we contact you?"
options:
sources:
- optionSet: yesNo
- inline:
- { value: "later", label: "Ask me later" }
- type: radio
id: beverage
label: "What would you like to drink?"
options:
groups:
- id: soft
label: "Non-alcoholic"
items:
- { value: "water", label: "Water" }
- { value: "juice", label: "Juice" }
- id: alcohol
label: "Alcoholic"
items:
- { value: "beer", label: "Beer" }
- { value: "wine", label: "Wine" }
- id: offboarding
title: Offboarding
nodes:
- type: checkbox
id: perks_used
label: "Which onboarding perks did you use?"
required: false
options:
sources:
- inline:
- { value: "buddy", label: "Buddy program" }
- { value: "laptop", label: "Laptop shipment" }
- { value: "training", label: "Training sessions" }
- { value: "swag", label: "Swag pack" }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment