getgrav / grav-plugin-form

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

basic captcha: no letters are displayed #582

Closed beamaria closed 1 year ago

beamaria commented 1 year ago

Hi all. I'm trying to implement basic captcha in my form. This is my form:

title: 'Contact Form'
form:
    fields:
        name:
            type: text
            label: Name
            validate:
                required: true
                message: 'Please enter your name!'
        email:
            type: text
            label: Email
            validate:
                type: email
                required: true
                message: 'Please enter your email address!'
        subject:
            type: text
            label: Subject
            validate:
                required: true
                message: 'Please enter a subject for your message!'
        message:
            type: textarea
            label: Message
            validate:
                required: true
                min: 10
                message: 'Email message needs to be more than 10 characters long!'
        basic-captcha:
            type: basic-captcha
            label: 'Are you human?'
            placeholder: 'copy the 6 characters'
            validate:
                required: true
    buttons:
        submit:
            type: submit
            value: 'Send Email'
    process:
        basic-captcha:
            message: 'Humanity verification failed, please try again...'
        email:
            from: '{{ form.value.email }}'
            to: '{{ config.plugins.email.to }}'
            subject: '[Contact] {{ form.value.subject|raw }}'
            body: '{{ form.value.message }}<br /><br />{{ form.value.name }}<br />{{ form.value.email }}'
        message: 'Thank you from contacting us!'
        display: /form/thankyou

But when I go to my contact form no letters are displayed:

Schermata 2022-11-18 alle 16 00 39

I copied the documentation for basic captcha and I also tried to change the default values, but no success. Working with: Grav: 1.7.37.1 Admin panel: 1.10.37.1 Gantry 5: 5.5.15 Template by Rocket Theme

beamaria commented 1 year ago

Still no solution after a month??? Forms are an essential part of a website!!

rhukster commented 1 year ago

Well the problem is that it works for everyone else, just not you. Do you have PHP GD installed?

beamaria commented 1 year ago

Hi Andy, thanks for replying. Sorry, what's GD? My PHP version is 8.0.26, but I can't find any reference to GD

Eilis

Il giorno 14 dic 2022, alle ore 21:58, Andy Miller @.***> ha scritto:

Well the problem is that it works for everyone else, just not you. Do you have PHP GD installed?

— Reply to this email directly, view it on GitHub https://github.com/getgrav/grav-plugin-form/issues/582#issuecomment-1352263723, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACZG6TS7TBPUK62LZWZQEWTWNI7G7ANCNFSM6AAAAAASEUSODI. You are receiving this because you authored the thread.

beamaria commented 1 year ago

Hi again Andy, I've found the source of the issue. I tried the code in MAMP environment, which evidently hasn't any GD enabled. Tried again on the online server and it works!. Thanks for pointing me in the right direction!