from otree.api import * doc = """ Your app description """ class C(BaseConstants): NAME_IN_URL = 'surveyapp' PLAYERS_PER_GROUP = None NUM_ROUNDS = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): is_dropout = models.BooleanField(initial=False) age = models.IntegerField(label = 'Please enter your age.') gender = models.StringField(label = 'Please choose your gender.', choices = ["Male", "Female", "Other","Prefer not to say"]) educationlevel = models.StringField(label = "Please choose your education level", choices = ["Primary School", "High School", "College", "University", "PhD", "Others"]) fathereducation = models.StringField(label = "Please choose your father's education background", choices = ["Primary School", "High School", "College", "University", "PhD", "Others"]) mothereducation = models.StringField(label = "Please choose your mother's education background", choices = ["Primary School", "High School", "College", "University", "PhD", "Others"]) # PAGES class SurveyQuestions(Page): form_model = "player" form_fields = ["age", "gender", "educationlevel", "fathereducation", "mothereducation"] page_sequence = [SurveyQuestions]