from otree.api import * c = cu doc = '' class C(BaseConstants): NAME_IN_URL = 'esg_survey_sample' 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', max=125, min=13) gender = models.StringField(choices=[['Male', 'Male'], ['Female', 'Female']], label='What is your gender', widget=widgets.RadioSelect) occupation = models.StringField(blank=True, label='What is your occupation?') industry = models.StringField(blank=True, label='What industry do you work in?') choices = models.StringField(choices=[['A', 'A'], ['B', 'B']], widget=widgets.RadioSelect) def custom_export(players): yield ['participant_code', 'id_in_group'] for p in players: pp = p.participant yield [pp.code, p.id_in_group] class Demographics(Page): form_model = 'player' form_fields = ['age', 'gender', 'occupation', 'industry'] class ChoiceSets(Page): form_model = 'player' form_fields = ['choices'] page_sequence = [Demographics, ChoiceSets]