from otree.api import * doc = """ Your app description """ class C(BaseConstants): NAME_IN_URL = 'invitation' PLAYERS_PER_GROUP = None NUM_ROUNDS = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): consent = models.BooleanField(label="Selezioni 'Si' se intende partecipare allo studio. Altrimenti selezioni 'No' se non intende partecipare.") workerid = models.StringField(label="") # PAGES class Consent(Page): form_model = 'player' form_fields = ['consent'] #timeout_seconds = C.timers['consent'] class Disagree(Page): # Display this page only if paricipant disagrees with the terms. @staticmethod def is_displayed(player: Player): return player.consent == 0 class Prolific_id(Page): form_model = 'player' form_fields = ['workerid'] #timeout_seconds = C.timers['workerid'] class After(Page): pass page_sequence = [Consent, Disagree, Prolific_id, After]