fr:simple-captchacomponents support the same events:
fr-verifyevent to the captcha.
fr-verify-doneevent. The example below, using the reCAPTCHA, listens to that event to run a submission.
fr-verify-errorevent. The example below, using the reCAPTCHA, listens to that event to show a case id
failure-case(which might tell users the verification failed).
event('fr-error-code'). This is the error code returned by the reCAPTCHA API, which is a string. Its value can either be:
empty— this tells you users didn't provide any answer. When that happens, you could notify users and keep the same challenge.
fr-reloadto the reCAPTCHA. (For added safety, the reCAPTCHA won't let users try to solve the same captcha multiple times.)
langattribute on the
fr-verifyevent to your component to trigger a verification, and listeners on the
fr-verify-errorevents. For more information on this, see the section Events above.