from otree.api import * class Constants(BaseConstants): name_in_url = 'surveynew' players_per_group = None num_rounds = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): age = models.IntegerField(label='What is your age?', min=13, max=125) gender = models.StringField( choices=[['Male', 'Male'], ['Female', 'Female']], label='What is your gender?', widget=widgets.RadioSelect, ) crt_bat = models.IntegerField( label=''' What's your major?''' ) crt_widget = models.IntegerField( label=''' where is your hometown?''' ) crt_lake = models.IntegerField( label=''' what's your constellation?''' ) # FUNCTIONS # PAGES class Demographics(Page): form_model = 'player' form_fields = ['age', 'gender'] class CognitiveReflectionTest(Page): form_model = 'player' form_fields = ['crt_bat', 'crt_widget', 'crt_lake'] page_sequence = [Demographics, CognitiveReflectionTest]