from otree.api import Currency as c, currency_range from . import models from ._builtin import Page, WaitPage from .models import Constants class MyPage(Page): form_model = models.Player form_fields = ['owns_tv', 'weekly_tv_hours'] def error_message(self, values): if values['owns_tv'] and not values.get('weekly_tv_hours'): return 'Please answer how much TV you watch.' class Results(Page): pass page_sequence = [ MyPage, Results ]