grav-plugin-form icon indicating copy to clipboard operation
grav-plugin-form copied to clipboard

How to add math captcha?

Open Sogl opened this issue 1 year ago • 4 comments

From a docs: https://learn.getgrav.org/17/forms/forms/fields-available#basic-captcha-field

It works:

basic-captcha:
            type: basic-captcha
            placeholder: copy the 6 characters
            label: Are you human?
...

process:
        basic-captcha:
            message: Humanity verification failed, please try again...
image

But how to add math type? adding type: math show errors.

Sogl avatar Dec 16 '22 14:12 Sogl

What error ?

rhukster avatar Dec 16 '22 14:12 rhukster

Failed to read /Users/artyom/domains/domain/user/pages/19.therapies/add/therapy-add.md: Unable to parse at line 21 (near " options: ").

I tried like that:

basic-captcha:
        type: basic-captcha
            options: 
                type: math
        placeholder: copy the 6 characters
        label: Are you human?

It works when change form option to MATH in the Form plugin. But how to do that in the form definition?

Sogl avatar Dec 16 '22 15:12 Sogl

your yaml is bad. options: should be at same level as type:

rhukster avatar Dec 16 '22 15:12 rhukster

Doesn't work, it shows characters captcha, not math.

Sogl avatar Dec 16 '22 15:12 Sogl