Properties

Properties — overview

How questions are configured. Properties are the YAML keys under a question that control its identity, content, choices, constraints, layout, and conditional behaviour.

What a property is

Every key under a - qid: line is a property. Properties divide into five families, each with its own reference page:

FamilyWhat it controlsReference
Identity & displayqid, type, text, instruction, formatIdentity & display
Choices & domainsoptions, group, scale, specify, anchor, exclusiveChoices & domains
Constraintsmin, max, exact, sum, decimal, required, validationConstraints
Layout & inputlayout, label, input, styleLayout & input
Conditional & dynamicif, options.from, scale.from, visibilityConditional & dynamic

How properties combine

Most properties are independent. A few interact:

  • options and group are mutually exclusive. Use one or the other.
  • options and options.from work together — options defines the authored domain, options.from filters which authored options render.
  • min, max, and exact constrain answer counts on multi and gridMulti. exact overrides min / max if both are set.
  • required: True forces the respondent to answer; readonly: True hides the question from the respondent. Both True is contradictory and rejected by the validator.

What’s allowed where

Not every property works on every question type. The validator rejects incompatible combinations — for example, scale: on a single is nonsense and will fail validation. Each question-type page lists the properties it accepts.

For the full matrix see the per-type pages under Question types.

Defaults

PropertyDefaultNotes
requiredTrue for answer-bearing types, irrelevant for infoOverride with required: False
orderfixedSet to random / randomEach for a shuffle, or point it at an expression like Q1.all to follow another question’s shown order. See Order.
readonlyFalseTrue for hidden helper questions
decimalFalse (on number / numberList)Set decimal: True to allow fractions
direction (gridNumber)rowsAffects total placement and column naming

Naming conventions

  • Property names are lowercase, dot-separated for hierarchical concepts: label.prefix, input.size, options.from.
  • Boolean values use True / False (capitalised, Python style).
  • Lists use YAML list syntax: min: 2 and max: 5, not min: 2, max: 5.

See also