from otree.api import * c = cu doc = 'To collect individual information' class C(BaseConstants): NAME_IN_URL = 'Survey' PLAYERS_PER_GROUP = None NUM_ROUNDS = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): Name = models.LongStringField(label='What is your name?') Age = models.IntegerField(label='What is your age?') Gender = models.IntegerField(choices=[[1, 'Female'], [2, 'Male'], [3, 'Others']]) Education = models.IntegerField(choices=[[1, 'High school or less'], [2, 'College'], [3, 'Master'], [4, 'PhD']], label='What is your education level?') Department = models.LongStringField(label='Which department do you work at ?') Worktime = models.IntegerField(label='How many years have you worked at this company?', min=0) Manager = models.BooleanField(choices=[[True, 'Yes'], [False, 'No']], label='Are you a manager?') class Survey(Page): form_model = 'player' form_fields = ['Name', 'Age', 'Gender', 'Education', 'Department', 'Worktime', 'Manager'] page_sequence = [Survey]