Adding Basic Captcha Protection on your Shopify Blog

Highlighted
New Member
5 0 0

Thanks, I removed that script and it appears to be working now.

In case anyone else is using this on their registration form, I had to use #create_customer in place of .comment-form in the script.

0 Likes
Highlighted
Shopify Partner
4 0 1

Hi All! 

I'm trying to put this on our contact form - I've gotten it to show up, but it's still posting the form - any ideas? 

thepfsolution.com/pages/contact

 

Gregor Ruthven Designer for PF Solution
0 Likes
Highlighted
Shopify Staff (Retired)
Shopify Staff (Retired)
27 0 3

Hey Caleb,

Nice site! Looking pretty good :)

This part here is related to the comment form only. 

 $(".comment-form").submit(function (e) {
          	   if (eval($("#question").val()) != $("#answer").val()) {
                     $("#answer").css('box-shadow', '0px 0px 7px red');
              	     e.preventDefault(); 
          	   } 
     	   });

 

To make this work for another form, you need to change the ".comment-form" to the class of the new form. I've gone ahead and changed this for you:

 $(".contact-form").submit(function (e) {
          	   if (eval($("#question").val()) != $("#answer").val()) {
                     $("#answer").css('box-shadow', '0px 0px 7px red');
              	     e.preventDefault(); 
          	   } 
     	   });

 

 

Hope this helps, 

Julian Nadeau, Shopify Mobile

Cheers! Julian Nadeau Developer, Shopify Mobile http://shopify.ca
0 Likes
Highlighted
Shopify Partner
120 0 4

Hi Julian,

This solution was put together to stop some of the less intelligent bots while a smarter solution is built

This is something that is being looked into, and we hope that a solution that is up to Shopify's standards is able to be released.

Just wondering if a 'smarter solution' is on the roadmap and whether we should expect it anytime soon? I'm getting an ever increasing amount of spam and it's starting to be a real pain.

In the meantime, a system that 'spams' any comment with a URL in word work for me, or at least 'unapprove' it.

Cheers,

Dave

1 Like
Highlighted
Shopify Staff (Retired)
Shopify Staff (Retired)
27 0 3

Hi Dave,

Sorry about the delay in response, somehow the email notification ended up in my spam folder!

I wouldn't be able to specifically comment on that portion, as I am not working on that area at this time.

However, I can definitely say that we already employ a very intelligent solution called "Akismet". Akismet automatically checks the comment against a stringent criteria, and is quite successful at catching spam (last I looked we were catching almost every spam message!) 

If you find you are still not happy with the level of spam detection, I would encourage the use of Disqus comments. You can see an example integration in a few themes, such as the Retina theme (only one I know off the top of my head, sorry!) We also use Disqus comments on the Shopify Blog.

 

All the best,

Julian Nadeau

Cheers! Julian Nadeau Developer, Shopify Mobile http://shopify.ca
0 Likes
Highlighted
Shopify Partner
4 0 1

Julian, 

Do you have access to the statistics for my store? thepfsolution.myshopify.com? It's interesting that you are catching almost every spam message because we receive one per week and don't have nearly enough traffic for that to be a small percentage. 

Gregor Ruthven Designer for PF Solution
0 Likes
Highlighted
Shopify Staff (Retired)
Shopify Staff (Retired)
27 0 3

Hey Caleb,

I took a look at your store and you seem to be using Disqus, a third party integration. So we can't really look at any statistics on your Disqus account.

While I find Disqus to be a great solution, there can still be some spam that gets through (even Google's Captcha and Spam Detection can't be 100% correct).

Here is an article to help you out with dealing with spam on your Disqus account: http://help.disqus.com/customer/portal/articles/466244-dealing-with-spam

Cheers!

Julian Nadeau

Cheers! Julian Nadeau Developer, Shopify Mobile http://shopify.ca
0 Likes
Highlighted
New Member
5 0 0

I've tried adding this to my contact form.  But the answers can be left blank and doesn't go through any validation.  Is there something I need to change?

0 Likes
Highlighted
Shopify Staff (Retired)
Shopify Staff (Retired)
27 0 3

For the contact form, try changing "comment-form" to "contact-form" in the Javascript code.

Hope that helps!

Cheers! Julian Nadeau Developer, Shopify Mobile http://shopify.ca
0 Likes
Highlighted
New Member
5 0 0

Awesome sauce!!  That worked, thanks!

0 Likes