Giter Site home page Giter Site logo

Comments (4)

flaviocopes avatar flaviocopes commented on May 10, 2024

I'm not seeing this bug. With the default comments.yaml configuration, the captcha is a required field and so is validated before processing the form.

Can you paste your comments.yaml (strip the recaptcha secret/site keys) and provide an explanation of what happens?

from grav-plugin-comments.

AlwaysCoolMilan avatar AlwaysCoolMilan commented on May 10, 2024

Screenshot

re-captcha-comment
(This is the message form show after submitting the comment and even it throws the validation message, comment is posted.)

comment.yaml

enabled: true
enable_on_routes:
  - /blog
disable_on_routes:
  - /blog/blog-post-to-ignore
  - /ignore-this-route
form:
  name: comments
  fields:
    -
      name: name
      label: Name
      placeholder: 'Enter your name'
      autofocus: 'on'
      autocomplete: 'on'
      type: text
      validate:
        required: true
    -
      name: email
      label: Email
      placeholder: 'Enter your email address'
      type: email
      validate:
        required: true
    -
      name: text
      label: Message
      placeholder: 'Enter your message'
      type: textarea
      validate:
        required: true
    -
      name: date
      type: hidden
      process:
        fillWithCurrentDateTime: true
    -
      name: title
      type: hidden
      evaluateDefault: grav.page.header.title
    -
      name: lang
      type: hidden
      evaluateDefault: grav.language.getLanguage
    -
      name: path
      type: hidden
      evaluateDefault: grav.uri.path
    -
      name: g-recaptcha-response
      label: Captcha
      type: captcha
      recatpcha_site_key: **********************************
      recaptcha_not_validated: 'Captcha not valid!'
      validate:
        required: true
      process:
        ignore: true
  buttons:
    -
      type: submit
      value: Submit
  process:
    -
      email:
        subject: '[New Comment] from {{ form.value.name|e }}'
        body: '{% include ''forms/data.html.twig'' %}'
    -
      captcha:
        recatpcha_secret: ********************************
    -
      addComment: null
    -
      message: 'Thank you for writing your comment!'

from grav-plugin-comments.

flaviocopes avatar flaviocopes commented on May 10, 2024

Cannot recreate this too. Are you using the latest version of Grav, the Form and Comments Plugins?
If yes, zip your user/ folder and send it to me via Gitter PM, so I can try directly your setup.

from grav-plugin-comments.

abooks23 avatar abooks23 commented on May 10, 2024

yes all latest ver.

from grav-plugin-comments.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.