We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19872
    • 1,078 Posts
    I've implement formit.hooks.recaptcha and recaptcha displays on the page, yet if I don't fill out the recaptcha field, the form still gets submitted. The page reloads displaying all my completed form fields and the recaptcha error message about recaptcha not being completed correctly. But the form still got submitted anyway.

    Does anyone know why this might be occurring?
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      As far as I know, unless the reCaptcha is being processed separately as a Javascript/AJAX module, there's no way for MODX, and thus FormIt, to know if the field is correct or not until the form is posted.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 19872
        • 1,078 Posts
        So are you saying then that formit.hooks.recaptcha doesn't work?
          • 19872
          • 1,078 Posts
          I'm pretty sure I have humans attacking one of my forms. I have the hidden formit field so I don't think it's a bot. Maybe formit will not deter them anyway. Same group has been attacking yet another one of my forms to. The put the same name in the first and last name fields, and then put jibberish and links in the comments fields.

            • 19872
            • 1,078 Posts
            Hmmm? I think the order of the hooks might be impotant. I think my form was redirecting and then recaptcha -ring.
            Moved it to the front... and now... no email.


            WAS:
            &hooks=`spam,email,redirect, recaptcha `

            CHANGED TO:
            &hooks=`recaptcha,spam,email,redirect`
              • 19872
              • 1,078 Posts
              That was it. I filled in the captcha field and then the form message deployed to my email IN box. Is there anyway to edit the MODX Docs at http://rtfm.modx.com/extras/revo/formit/formit.hooks/formit.hooks.recaptcha to make mention that recaptcha should come somewhere before the email?

              Maybe that's an obvious thing, but I was just following the instructions of "add recaptcha to your formit &hooks parameter."
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                The simple contact form tutorial has it like this:

                &hooks=`recaptcha,spam,email,redirect`


                http://rtfm.modx.com/extras/revo/formit/formit.tutorials-and-examples/formit.examples.simple-contact-page
                  Studying MODX in the desert - http://sottwell.com
                  Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                  Join the Slack Community - http://modx.org
                  • 19872
                  • 1,078 Posts
                  Is there a way for me to update that article at formit.hooks.recaptcha?
                    • 15558
                    • 108 Posts
                    Up !

                    I'd have been glad to read this topic earlier. Can we please update the rtfm article about recaptcha, as mmcgee suggested it ?
                      Sorry for that ⇧ , I'm no dev but I wanna try