from otree.api import * #from captcha.fields import ReCaptchaField #from captcha.widgets import ReCaptchaV2Checkbox author = 'Elisa Macchi' doc = """ Introduction, Consent Form and Captcha """ class Constants(BaseConstants): name_in_url = 'consent' players_per_group = None num_rounds = 1 min_time = 2 max_time = 5 max_bonus = cu(20) participantfee = cu(1) instructions_template = 'consent/instructions.html' class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): pass #captcha = ReCaptchaField(widget=ReCaptchaV2Checkbox) #from captcha.fields import ReCaptchaField class Consent(Page): form_model = "player" class Captcha(Page): _allow_custom_attributes = True form_model = 'player' form_fields = [] # captcha does not get in here # Check the hidden field hidden_field = models.StringField() page_sequence = [ Consent, Captcha ]