from otree.api import Currency as c, currency_range from ._builtin import Page class StartR(Page): pass class Instructions(Page): form_model = 'player' form_fields = ['ex1', 'ex2'] def error_message(self, value): if value["ex1"] != 400: return 'The first question is not answered correctly. Consult the instructions and try again.' elif value["ex2"] != 350: return 'The second question is not answered correctly. Consult the instructions and try again.' class StartR2(Page): pass class Buckets(Page): form_model = 'player' form_fields = ['balls_A', 'balls_B', 'balls_I'] def before_next_page(self): self.player.set_payoffs_bucket() page_sequence = [StartR, Instructions, StartR2, Buckets] #