from otree.api import * doc = """ Pre-experiment survey """ class Constants(BaseConstants): name_in_url = 'SVY_Pi_S246' players_per_group = None num_rounds = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): # Prolific ID sona = models.StringField( blank=False, label='') # Socio-demo edu = models.IntegerField( blank=False, choices=[[1, 'No formal qualifications'], [2, 'Secondary education (e.g. GED/GCSE)'], [3, 'High school diploma/A-levels'], [4, 'Technical/community college'], [5, 'Undergraduate degree (BA/BSc/other)'], [6, 'Graduate degree (MA/MSc/MPhil/other)'], [7, 'Doctorate degree (PhD/other)'], [8, 'Do not know/not applicable']], label='1. Which of these is the highest level of education you have completed?', widget=widgets.RadioSelect, ) employ = models.IntegerField( blank=False, choices=[[1, 'Agriculture, Food and Natural Resources'], [2, 'Architecture and Construction'], [3, 'Arts'], [4, 'Business Management & Administration'], [5, 'Education & Training'], [6, 'Finance'], [7, 'Government & Public Administration'], [8, 'Medicine'], [9, 'Hospitality & Tourism'], [10, 'Information Technology'], [11, 'Legal'], [12, 'Policing'], [13, 'Military'], [14, 'Manufacturing'], [15, 'Marketing & Sales'], [16, 'Retail'], [17, 'Science, Technology, Engineering & Mathematics'], [18, 'Social Sciences'], [19, 'Transportation, Distribution & Logistics'], [20, 'Other'], [21, 'Rather not say']], label='2. Which of the following best describes the sector you primarily work in?', widget=widgets.RadioSelect, ) marital = models.IntegerField( blank=False, choices=[[1, 'Single'], [2, 'In a relationship'], [3, 'Engaged'], [4, 'Married'], [5, 'Widowed'], [6, 'Divorced'], [7, 'Separated'], [8, 'Never married'], [9, 'Rather Not Say'], [10, 'In a civil partnership/civil union or similar']], label='3. What is your relationship / marital status?', widget=widgets.RadioSelect, ) # PAGES class Info(Page): form_model = 'player' form_fields = ['sona'] class Ri(Page): form_model = 'player' form_fields = ['edu', 'employ', 'marital'] page_sequence = [Info, Ri]