Commuter travel survey

This short fictional market-research study asks people in Harbourview about recent travel to work or study. It shows consent and eligibility screening, a multiple-answer question, and text follow-ups that appear only when needed.

Save the source as commuter-travel.qube, open it in VS Code, and run QubeSurvey: Run Interview. See Getting started with QubeScript for setup and uploading an immutable version.

@survey commuter_travel @language en @mode cawi
 
@options commute_modes
1: Bus
2: Train
3: Car or van
4: Bicycle
5: Walk
6: Another mode
 
@question introduction display
# Commuter travel in Harbourview
 
This fictional study asks about travel to work or study during the past seven
days. Taking part is voluntary and should take about three minutes. Do not
include names or confidential details.
 
@question consent single
Do you agree to take part in this study?
@options
1: Yes
2: No
 
@route consent_check
if answers.consent == 2 -> screenout
else -> eligibility
 
@section eligibility
@question commute_recently single
In the past seven days, did you travel to a regular place of work or study at least once?
@options
1: Yes
2: No
 
@route commute_check
if answers.commute_recently == 2 -> screenout
else -> commute_details
 
@section commute_details
@question modes_used multi
Which of these modes did you use for any trip to work or study in the past seven days? Select all that apply.
@options commute_modes
 
@question other_mode text @if answers.modes_used.contains(6)
What other mode did you use?
@validate other_mode_length text.length(answer.value_or(answers.other_mode, "")) <= 120
Use no more than 120 characters.
 
@question main_mode single
Thinking about your most recent trip to work or study, which of these modes did you use?
@options commute_modes.select(answers.modes_used.ids())
 
@question commute_satisfaction single
Overall, how satisfied or dissatisfied are you with your trips to work or study in the past seven days?
@options
1: Very dissatisfied
2: Somewhat dissatisfied
3: Neither satisfied nor dissatisfied
4: Somewhat satisfied
5: Very satisfied
6: Cannot judge
 
@question improvements multi
Which changes would most improve your trips to work or study? Select all that apply.
@options
1: More reliable journey times
2: More frequent services
3: Lower travel costs
4: Safer walking or cycling routes
5: Better access for people with mobility needs
6: Another change
7: No change needed @exclusive
 
@question other_improvement text @if answers.improvements.contains(6)
What other change would improve your trips?
@validate improvement_length text.length(answer.value_or(answers.other_improvement, "")) <= 160
Use no more than 160 characters.
 
@outcome complete
Thank you. Your commuter-travel response is complete.
 
@outcome screenout
Thank you. There are no further questions.

Try the branches

Choose No at consent or at the recent-travel question to see the screenout outcome. To see the full route, choose Yes, select Another mode in the multiple-answer question, and enter a short description. The recently used modes determine the choices in the following main-mode question, so it cannot contradict the multiple-answer response. The other-mode follow-up appears only when that option is selected. The final question also has an optional text follow-up for Another change.

Use Back to change an answer and check that the relevant follow-up appears or disappears with it. The study asks about a fictional place; replace the title, location, period and answer options together when adapting it to a real research brief.