Building surveys with conditional questions in Decidim

Decidim's surveys component can ask short, long and single-option questions and show later questions only when earlier answers match. This page covers how to design, build, test and hand over those surveys, and what drives the effort.

On this page

Building Decidim surveys with conditional questions for consultations and feedback

A public body that needs structured feedback inside a Decidim process can build it with the surveys component. The component supports short answer, long answer and single option questions, and display conditions that show a question only when a participant chose specific earlier answers. Administrators can also save a questionnaire as a template and reuse it across processes. Teams usually reach for this when they run a consultation with a fixed set of questions, a feedback round after a draft or service change, or a registration-style intake where the answers decide which follow-up questions appear. The work is mostly question design, testing and governance rather than coding. The hard decisions are which questions truly need to exist, who approves the wording, and how answers will be read and reported afterwards.

Before building anything, map the questionnaire on paper: each question, its type, whether it is required, and which earlier answer triggers each conditional follow-up. Conditions add branches, so a short chain of conditions can produce many paths that each need a test. Check every path end to end as a participant would see it, including what happens when a respondent changes an earlier answer. Confirm with your Decidim maintainers or in the Decidim docs for the surveys component which character limits, option settings and display condition behaviors apply to your installed version, because these details differ between releases and should not be assumed from memory.

Templates matter most when the same feedback format returns across processes or organizations. Build the questionnaire once, have legal, communications and the program owner sign off on the wording, and then reuse it through the Decidim templates documentation. Governance questions to settle early include who may edit a live survey, how changes after publication affect answers already received, who can export responses, and how personal data collected in free-text answers is retained. Plan a short pilot with a few internal testers, then review the exported results once to confirm the conditional logic produced the answers you expected.

What the Decidim surveys component does

The surveys component is one of several components a Decidim process can hold, and it is where consultation and feedback questions live. The cards below cover the parts that shape a survey's design: question types, display conditions, reusable templates and how the component sits inside a process. Confirm each behavior against the documentation for the Decidim version you run before you commit to a design.

Short and long answer questions

Short answer and long answer are the two free-text question types the surveys component supports. Use short answer for values you will count or compare, such as a postcode, a budget figure or a yes-or-no explanation, and long answer for reasoning you will read and code by hand. The type you pick sets how analysts will work with the responses later, so decide it before you write the question text. Check the character limits your version applies to each type, because a limit that is too tight will cut off the answers you need.

Surveys docs

Single option questions

Single option questions let participants pick one answer from a fixed list you define. They produce clean counts for the council or board, which makes them the natural base for branching. Write the options so each one is mutually exclusive and understandable without context, since participants who select one option cannot record a second. Keep the list short enough that people read every choice. Any question you plan to use as a trigger for a later question must be a single option question with well-defined answers.

Display conditions on earlier answers

Display conditions show a question only when a participant has chosen specific earlier answers. This lets one survey serve residents with different situations without forcing everyone through every question. Map the branches on paper first: list each trigger answer, the questions it reveals and whether those questions can reveal further ones. Test each path end to end as a participant, because a condition that hides a required question can leave a respondent unable to finish. Confirm how your version handles conditions on questions that were already answered before an admin changed the survey.

Reusable questionnaire templates

Administrators can create questionnaire templates for the surveys component and reuse them across processes. A template lets a city or agency keep a standard feedback form, consent wording or consultation question set in one place and apply it to each new process. Changing a template does not automatically rewrite surveys already built from it, so agree who owns updates and how versions are recorded. Review the template for wording that has legal or policy weight before reuse, since a copied question can carry an old commitment into a new consultation.

Templates docs

Surveys as a process component

A survey in Decidim is a component inside a participatory space, usually a process, so its visibility, phases and permissions follow the space it belongs to. Plan the survey as part of the process timeline: decide when it opens, when it closes and which other components, such as proposals or meetings, run alongside it. Permissions also matter, because the verification settings of the space and component decide who can answer. Confirm in your version whether one process can hold several surveys and how each one is labeled for participants.

Testing before publication

A survey that goes live with a broken branch cannot be fixed for the people who already answered it, so testing is the cheapest control you have. Walk every path through the conditions, submit a complete response and an incomplete one, and check the admin export shows each answer under the right question. Run the test with a non-admin account, since administrators may see fields that participants do not. Record the test results with the survey settings so the council can show how the form was checked.

Configuration decisions before building a survey

This table compares the main configuration choices for a Decidim survey: question type, whether a conditional question is worth it, template or one-off questionnaire, long-answer limits, and who may edit after publication. Read each row as a decision to settle before building, and note the cost of leaving it until late. Confirm current behavior for each option against the surveys and templates documentation for your Decidim version.

DecisionOption and when it fitsTrade-offWhat breaks if decided late
Question type per itemShort answer for codes, names or single facts. Long answer for reasoning or comments. Single option for choices that feed later logic.Single option answers are easy to analyze but limit nuance. Long answers need more reading effort.Questions written as free text cannot drive display conditions, so branching must be rebuilt.
Conditional question or second surveyUse a conditional question when a short follow-up depends on one answer. Use a second survey when follow-up groups are large or audiences differ.Conditions add a dependency chain that reviewers must test. A second survey is simpler but splits responses.Adding conditions after publication changes what respondents see mid-consultation and complicates comparison of answers.
Template or one-off questionnaireCreate a template for consultations you will repeat across processes or assemblies. Use a one-off questionnaire for a single, unusual consultation.Templates save setup time and keep wording consistent. One-off builds are faster to start but drift over time.Retrofitting a template from an existing survey means reviewing every question and condition again.
Character limits for long answersSet limits that match the analysis effort you can commit to. Confirm the maximum length the component allows in your version before writing instructions.Short limits keep answers analyzable. Long limits capture detail but increase reading time for staff.Limits set after responses arrive can cut off answers that participants already wrote.
Who can edit questions after publicationLimit editing to one named administrator per survey. Agree in advance which edits are allowed once participation opens.Tight control protects comparability. Broad editing rights make it easier to fix typos but risk changing meaning.Edits during an open consultation undermine trust in results and can invalidate answers already given.
Testing branching before launchRun every condition path with test answers in a non-public space before opening the survey.Testing takes staff time but catches hidden or unreachable questions.Participants find dead-end paths or missing questions after launch, which generates support requests.
Export and analysis formatDecide which question types and answer fields the analysis team needs, then check that the export carries them.Extra fields add columns and review work. Missing fields may require a second export.Discovering missing fields after closing means reopening or rebuilding the analysis.

How display conditions change the question flow

A display condition makes a follow-up question appear only when a respondent has given a specific earlier answer, so the questionnaire becomes a set of paths rather than one fixed list. Consider this illustrative example: a feedback survey asks whether a respondent has used the proposed bike lane (single option: yes or no). Only respondents who choose yes see a follow-up asking how often they use it. Everyone else skips straight to the next question. The condition is attached to the question that depends on the earlier answer, so the logic lives in the survey itself and the administrator must set the trigger option correctly in the survey configuration.

The main cost of conditional logic is testing, not configuration. Each branch is a separate respondent path, and a survey with two conditional questions and several options can produce more paths than most teams expect. Build a short table that lists every path from the first question to the last, then walk each one through the public form as a participant would. Check three things on every path: the right questions appear, the answers are saved against the correct questions in the export, and no hidden question is marked as required. A required question that a respondent cannot see will block submission with no visible explanation, which is the most common way conditional surveys fail in practice.

Before you publish, confirm the exact behavior for your Decidim version in the official surveys documentation, including how a condition behaves when the trigger question is edited after responses exist, whether answers to hidden questions are retained, and which question types can act as triggers. Version behavior can differ between minor releases, so record the version you tested against. Ask the administrators who will maintain the survey how they will handle edits, and keep a copy of the test table with the survey brief so a later change can be retested on every path.

How a Decidim survey moves from draft to published results

This sequence takes a survey from consultation goals to a tested, published questionnaire and a handover package the team can reuse. Each step closes with a named output so the work can be checked before the next one starts.

  1. Scope the consultation questions

    The consultation owner and the staff who will analyze answers agree on what decisions the survey must inform, who the respondents are, and which questions are required. The team writes this down as a short scope note that lists each question's purpose and the answer format it needs. The step is done when the owner signs off the scope note and nobody is adding questions informally.

  2. Design the question set and branches

    Draft every question with its type, such as short answer, long answer or single option, and its character limits in mind, then map which earlier answers should reveal which follow-up questions. Keep the map simple enough that an analyst can read every path from start to finish. The output is an approved question map with each display condition written out as a plain rule.

  3. Create or reuse a questionnaire template

    Check whether a questionnaire template already covers part of the question set, since Decidim lets administrators reuse templates across processes. Create a new template where none fits, or copy and adjust an existing one, so that the wording and branches are stored in one place. The step is complete when the template holds the approved questions and a second administrator can locate it by name.

  4. Configure the surveys component in a process

    Add the surveys component to the target participatory process, attach the questionnaire from the template, and confirm that the display conditions point to the intended earlier questions. Review the component's visibility and publication settings against the consultation calendar. The output is a configured but unpublished component that matches the question map line by line.

  5. Test every branch as admin and participant

    Work through each path in the question map from the start, once as an administrator and once in a test account that matches a real participant's access level. Record which questions appear for each answer combination and check that hidden questions stay hidden and their earlier answers are not lost. The step is done when a written branch list shows every path tested, with the result and any fix recorded beside it.

  6. Publish and monitor responses

    Publish the component once the branch list has no open defects, then watch the responses for unexpected drop-offs, empty required answers or questions that participants report as confusing. Make corrections to wording only through a documented change, so the answers collected before and after remain comparable. The output is a log of responses and any agreed changes, kept with the consultation record.

  7. Hand over exports and templates

    Export the responses in the format the analysts need and confirm the export matches the question map, including the answers to conditional questions. Pass the final template, the question map and the branch list to the owner so the next consultation can start from a tested base. The step closes when the owner confirms receipt and the team archives these materials with the consultation record.

What drives survey effort and cost

This table compares the main components of survey work in Decidim, showing who does each task, whether it is one-time or recurring, and what pushes effort up. Use it to scope a quote and to decide which items your own team can handle. Branch count, legal review and verification rules tend to drive the most effort.

DriverWhat it involvesOne-time or recurringHow to keep it down
Number of questions and branchesEach display condition multiplies the paths a respondent can take and the paths someone must testOne-time for the design, recurring when consultations changeLimit branches to decisions that change what is asked, and keep answer options consistent
Drafting and translationWriting question text and options, then producing each language version for the same surveyOne-time per template, recurring per new consultationReuse approved wording from templates and agree a glossary before translation starts
Legal or policy review of wordingChecking that questions are neutral, accurate and consistent with the consultation's legal basisRecurring for each consultation, sometimes one-time for standard templatesAsk the reviewer to comment on the template once and confirm which changes need fresh review
Processes reusing templatesNumber of processes and components that draw on the same questionnaire template, and how many need local editsOne-time to build, recurring to maintain each copyKeep a small set of approved templates and confirm whether edits to a template affect existing surveys
Testing across languages and devicesWalking every branch in each language and on phone, tablet and desktop, including answers that hide questionsOne-time for template branch testing, recurring for each new language or major changeTest the full branch map once per template and retest only the paths a change touches
Verification rulesDeciding who may answer, such as verified participants only, and confirming the authorization setup works for the surveyOne-time for setup, recurring when rules change for a consultationConfirm the authorization method with the team that manages participant verification before building the survey

How a respondent moves through a conditional survey

The diagram starts when a participant opens the survey component and answers the first question, such as a single option choice. The display condition then checks that earlier answer against the rule the administrator set. If it matches, the follow-up question appears and the participant answers it. If it does not match, the follow-up is skipped and the participant goes straight to the next visible question. Before you publish, walk each branch yourself, because a skipped question that is still required can block submission.

Illustrative branch path showing how one display condition shows or skips a follow-up question before submission.

How surveys connect to the rest of a Decidim platform

Where does a survey live in Decidim's structure?

A survey is a component added to a participatory space, usually a process, so it inherits that space's dates, visibility and administrators. Decidim organizes participation into spaces such as processes, assemblies and initiatives, and components such as surveys, proposals and meetings sit inside them. This matters for planning because the survey's open and close dates, its audience and its results all follow the space it belongs to. Before you build a questionnaire, confirm in your own environment and version which space will host it, who holds the administrator role there, and whether the process will also carry other components that participants will see alongside the survey.

Can survey answers be restricted to verified participants?

Yes, Decidim includes identity verification and authorization systems that let organizations restrict actions such as voting or signing to verified participants. Whether a survey must enforce this depends on the consultation: an open feedback survey may accept anyone with an account, while a survey that informs a binding decision usually needs a clear rule about who may answer. Confirm in your version which authorization methods your organization has enabled and how the component's permissions are set, because a survey that looks restricted in the front end but is open to unverified users is a common review finding. Test with an unverified account and an account from each verification path before launch.

Can a questionnaire template be reused across processes?

Yes, Decidim administrators can create questionnaire templates for the survey component and reuse them across processes. This saves time when the same feedback questions appear in several consultations, such as a standard satisfaction survey after each assembly. The practical cost is governance: a template changed for one process should be reviewed for its effect on others, and a template that collects personal data needs the same privacy review in every place it is used. Ask your administrators who may create and edit templates, and agree on a naming and versioning convention so that participants and auditors can tell which questions were asked in which consultation.

How do moderation and administration tools apply to survey responses?

Survey responses are handled through the administrator's component settings and the administration panel, so the people who run the consultation need clear roles and a documented workflow. Decidim's moderation features, including reports and hiding, apply to participatory content such as proposals and comments, so confirm in your version how they interact with free-text answers before you open a survey with long answer questions. The main risk is an open text field that receives abusive or personal content. Agree who reviews long answers, how quickly, and what happens to content that must be removed or redacted, and make sure the role model gives those reviewers the access they need without giving them unnecessary rights.

What should you confirm about exporting survey results for a council or board?

Confirm the export formats, the fields included and how conditional questions appear in your version before promising results to a council or board. Decidim's survey results are typically needed in a form that reviewers can read, and answers to questions that were hidden by display conditions must be interpreted correctly, because a blank answer may mean the question was not shown rather than skipped. Run a test export with dummy responses that cover every branch, and check that the file contains the headers, question order and answer labels your reporting requires. Record the version and export settings used, since a board may later ask how the summary was produced.

How do surveys interact with the rest of a platform's integrations and upgrades?

Surveys depend on the same identity, email and storage configuration as the rest of the platform, so changes to login providers, SMTP or file handling can affect survey access and notifications. Decidim supports Facebook, Twitter, Google and Decidim-to-Decidim OAuth 2.0 login out of the box, and any other OmniAuth strategy can be added, so confirm which provider your participants will use before testing. Upgrades between minor versions require following each release's instructions and backing up the database first, which means a survey launched on one version should be retested after an upgrade. Plan a regression check of each open survey, including its display conditions and exports, as part of every platform change.

What you receive and keep after a survey build

The handover should leave your team able to run the survey without us. Ask for four artifacts: a question map that lists every question, its type, its character limits and the display condition that controls it, a tested branch log that records each path a participant can take through the survey and the result observed on it, a template library of the questionnaire templates saved for reuse across processes, and short admin instructions for editing a live survey. The question map is the document your team will check when a participant reports a missing question, so it should name the parent question and the exact earlier answer that triggers each conditional question. The branch log is your evidence that the conditions behaved as designed before launch, and it should be kept with the process record.

The runbook for response exports is the artifact teams most often skip. It should state who may export survey responses from the component, in which format, where the file is stored, how long it is kept, and how personal data in free-text answers is handled before the file leaves the platform. Confirm with your privacy lead whether those answers fall within your retention rules before the first export. Your team keeps the live survey, its templates, the exports and the admin accounts, and it decides who may edit questions after publication. Changes after launch should be requested in writing with the question ID, the reason, and the branch log entry it affects. Ask in the quote whether retesting of changed branches is included, and whether it is billed per change or as a block of hours.

How DeployOpen scopes and delivers Decidim survey work

DeployOpen plans, builds, tests and documents Decidim survey work inside infrastructure you control, so the questionnaire logic is reviewed before participants see it. Each engagement starts from a written scope that names the questions, the branching rules and the handover material.

How we scope

  • Map each consultation's questions, answer types and character limits in a written scope before any build starts.
  • List every display condition that shows a follow-up question, and confirm which earlier answers trigger each one.
  • Agree in writing whether questionnaire templates will be reused across processes, and which spaces will use them.

How we build

  • Configure the surveys component in a staging instance that matches your production Decidim version and settings.
  • Test each branch path with sample answers, including skipped and changed responses, before publication.
  • Build reusable questionnaire templates for recurring consultations, and record which template each process uses.

How we hand over

  • Deliver a written guide describing every question, condition and limit so administrators can maintain the survey.
  • Document the test cases used to verify conditional questions, so your team can rerun them after changes.
  • Walk your administrators through publishing, editing and exporting responses in the surveys component.

How we support

  • Available as a retainer for updates to questionnaires between consultation phases, with scope agreed in writing.
  • Re-test conditional logic after each Decidim minor version upgrade, since survey behavior may change across releases.
  • Confirm with your team which support hours, response paths and escalation contacts apply before the retainer starts.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.