I know this thread is quite old but it is still somewhat relevant. I've got a very basic form and have just tried to implement reCaptcha. Everything is working perfectly except for one thing...
I quickly mention that I make use of the success placeholder. If the one is returned, I use the jquery load function to display a thank you message from another modx page (this page also contains the google conversion code). I only do this because my clients do no want the visitor to be redirected to another page.
That being said, if I enter the
correct phrase into the reCaptcha input, the form refreshes and the form sends...and of course the success placeholder is updated with the "1" (all good).
If I enter the
incorrect phrase into the reCaptcha input, the page refreshes but the form does not send...and I get my error message (all good). The problem is, the success placeholder still gets populated with a '1' - despite the fact that reCaptcha has failed. The docs tell me that the hooks are executed in sequence...that if a hoook fails, the rest of them don't execute. If this is true, am I correct in assuming that I shouldn't be getting a '1'?
Here is my snippet call:
[[!FormIt?
&hooks=`recaptcha,spam,email`
&validate=`phone:blank`
&recaptchaTheme=`white`
&emailTpl=`EmailTemplate`
&emailSubject=`Some Enquiry`
&emailFrom=`[[+email1]]`
&emailTo=`
[email protected]`
]]
I've noticed on the reCaptcha docs that one can return a success message - is there any way for me to do that via the modx snippet (as an alternative to my current solution)?
Any insight or assistance will be greatly appreciated!
[ed. note: supanick last edited this post 12 years, 8 months ago.]