oTree Hub
Studio
OTAI
New
Heroku
Forum
Public projects
Featured
Example code
miadexp
Links
Demo
Browse source code
Download
Author
miad
Description
Recipes for common tasks in oTree
Apps
appcopy1
appcopy2
are_you_sure
'Are you sure?' popup based on the user's input
back_button
Back button for multiple instructions pages
balance_treatments_for_dropouts
bmi_calculator
chat_with_experimenter
Chat with experimenter, using Papercups
complex_form_layout
comprehension_test
Comprehension test. If the user fails too many times, they exit.
configurable_players_per_group
Configurable players per group. See here: https://otree.readthedocs.io/en/latest/treatments.html#...
constant_sum
count_button_clicks
Count button clicks (hidden input)
custom_chat
Of course oTree has a readymade chat widget described here: https://otree.readthedocs.io/en/late...
detect_mobile
Detect and block mobile browsers
dropout_detection
Dropout detection (if user does not submit page in time)
gbat_keep_same_groups_part0
gbat_keep_same_groups_part1
gbat_keep_same_groups_part2
Preserve same groups as a previous app that used group_by_arrival time.
gbat_new_partners
group by arrival time, but in each round assign to a new partner.
groups_csv
Reads groups from a CSV file. Inside this app, you will find a groups6.csv, which defines the gro...
history_table
History table
longitudinal
Longitudinal study (2-part study taking place across days/weeks) Another way to do longitudinal ...
min_time_on_page
Minimum time on a page
multi_language
How to translate an app to multiple languages (e.g. English and German). There are 2 ways to def...
multi_page_timeout
Timeout spanning multiple pages
multi_select
Question that lets you select multiple options (multi-select, multiple choice / multiple answer)
other_player_previous_rounds
pass_data_between_apps_part1
pass_data_between_apps_part2
pay_random_round
Select a random round for payment
progress_bar
All you need is a participant field called 'progress' then keep adding 1 to it.
questions_from_csv
Read quiz questions from a CSV. (Also randomizes order) It would be much simpler to implement thi...
question_with_other_option
Menu with an 'other' option that lets you type in a value manually
quiz_with_explanation
Quiz with explanation. Re-display the previous page's form as read-only, with answers/explanation.
radio
Radio buttons in various layouts, looping over radio choices
radio_switching_point
Table where each row has a left/right choice, like the strategy method. This app enforces a singl...
randomize_cross_product
random_num_rounds
random_num_rounds_multiplayer
Random number of rounds for multiplayer (random stopping rule)
random_num_rounds_multiplayer_end
random_question_order
random_task_order
For each participant, randomize the order of tasks A, B, and C. Task B has 2 pages, which are alw...
ranking_widget
"Widget to rank/reorder items". See http://sortablejs.github.io/Sortable/ for more examples.
redirect_to_other_website
show_other_players_payoffs
slider_graphic
An image that changes when you move a slider. If your image is a some kind of chart, it's better ...
slider_live_label
Slider with live updating label
treatments_from_spreadsheet
Reading treatment parameters from a CSV spreadsheet
wait_for_specific_people
Wait only for specific people
waiting_too_long_part0
waiting_too_long_part1
group_by_arrival_time timeout (continue with solo task)
waiting_too_long_part2
wait_page_timeout
Timeout on a WaitPage (exit the experiment)
Last updated
2021-09-03
Note: To open an *.otreezip file, enter:
otree unzip YOUR-FILE.otreezip