Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add math captcha? #584

Open
Sogl opened this issue Dec 16, 2022 · 4 comments
Open

How to add math captcha? #584

Sogl opened this issue Dec 16, 2022 · 4 comments

Comments

@Sogl
Copy link
Contributor

Sogl commented Dec 16, 2022

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.

@rhukster
Copy link
Member

What error ?

@Sogl
Copy link
Contributor Author

Sogl commented Dec 16, 2022

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?

@rhukster
Copy link
Member

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

@Sogl
Copy link
Contributor Author

Sogl commented Dec 16, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants