getgrav / grav-plugin-form

Grav Form Plugin
http://getgrav.org
MIT License
53 stars 79 forks source link

failed basic-recaptcha leads to error page #581

Closed renebesicke closed 1 year ago

renebesicke commented 1 year ago

Hello there!

Instead of getting the captcha-failed message "Humanity verification failed, please try again...", my form leads to my error/404-page Am I missing something?

Thats how my yaml looks like:

title: Formular
published: false
form:
    name: contact-form
    fields:
        mymessage:
            name: nachricht
            label: Nachricht
            placeholder: 'Schreiben Sie uns eine Nachricht ...'
            autocomplete: 'on'
            type: textarea
            rows: 6
            validate:
                required: true
        basic-captcha:
            type: basic-captcha
            placeholder: Ergebnis
            label: Captcha
    buttons:
        submit:
            type: submit
            value: 'Nachricht senden'
    process:
        basic-captcha:
            message: 'Humanity verification failed, please try again...'
        email:
            from: '{{ config.plugins.email.from }}'
            to:
                - '{{ config.plugins.email.to }}'
                - '{{ form.value.email }}'
            subject: '[Feedback] {{ form.value.name|e }}'
            body: '{% include ''forms/data.html.twig'' %}'
        save:
            fileprefix: feedback-
            dateformat: Ymd-His-u
            extension: txt
            body: '{% include ''forms/data.txt.twig'' %}'
        message: 'Thank you for your feedback!'
        display: /danke
renebesicke commented 1 year ago

Okay, it is because published is on false... 🙈 Otherwise i get to the page. But it's just a form i included elsewhere. Can I select an other page it should redirect to if captcha failed?

JS-Media-Creation commented 1 year ago

Okay, it is because published is on false... 🙈 Otherwise i get to the page. But it's just a form i included elsewhere. Can I select an other page it should redirect to if captcha failed?

Would appreciate a config option for redirecting to an individual page if captcha failed!