from otree.api import *
doc = """
Demographics app
"""
class C(BaseConstants):
NAME_IN_URL = 'demographics'
PLAYERS_PER_GROUP = None
NUM_ROUNDS = 1
class Subsession(BaseSubsession):
pass
class Group(BaseGroup):
pass
class Player(BasePlayer):
participantID = models.StringField(
label="ParticipantID:
(Provided to you by the Experimenter)"
)
age = models.StringField(
label="What is your age?",
choices=[
'18-24',
'25-34',
'35-44',
'45-54',
'55-64',
'65 or older',
],
widget=widgets.RadioSelect,
)
# PAGES
class Demographics(Page):
form_model = 'player'
form_fields = ['participantID', 'age']
page_sequence = [Demographics]