from otree.api import * doc = """ Welcome Page and Participant Info """ class Constants(BaseConstants): name_in_url = 'Welcome' players_per_group = None num_rounds = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): Name = models.StringField(label="Please enter your name:") Gender = models.StringField( choices=['Female', 'Male', 'Other', 'Prefer not to say'], widget=widgets.RadioSelect ) Age = models.IntegerField(min=15, max=90, label="Please enter your age:") Education = models.StringField( label="What is the highest degree or level of education you have completed:", choices=['High School', 'Bachelors Degree', 'Masters Degree', 'not listed', 'Prefer not to say'], ) # PAGES class Welcome(Page): pass class Questions(Page): form_model = 'player' form_fields = ['Name', 'Gender', 'Age', 'Education'] class Instructions(Page): timeout_seconds = 240 page_sequence = [Welcome, Questions, Instructions]