from otree.api import * doc = """ Experiment participation consent """ class C(BaseConstants): NAME_IN_URL = 'thesis_consent' PLAYERS_PER_GROUP = None NUM_ROUNDS = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): consent = models.BooleanField( label="I confirm that I have read and understood the consent form " "and voluntarily agree to participate in this study." ) class Consent(Page): form_model = 'player' form_fields = ['consent'] @staticmethod def error_message(player, values): if not values['consent']: return "Please confirm your consent before continuing." page_sequence = [Consent]