Add a custom captcha field

Spam is everywhere. Scripts, robots scan the web for emails, forms, etc. to contaminate your marketing campaigns.

Thankfully WP Contest Creator is prepared for this, so your lists are clean & protected from these spam bots.

WP Contest Creator doesn't have the typical captcha you see on forms with a distorted image of letters & numbers, but you are able to create one captcha field to protect from spam, using the existing WP Contest Creator features.

All you have to do is create an extra form field with a question and a field validation type "Custom" and enter a Javascript callback function name such as "prevent_spam" (without the double quotes) then add a Javascript function named like that on the "SEO & Tracking" tab like:

function prevent_span(value, element) {
  if(value == 5) {
    return true;
  } else {
    return false;

On this custom field you would ask a question like:"What is the sum of three plus two?" and when the participants answers "5" it would be validated as correct, but deny all spam bots that cannot answer this question correctly.

You can change the question or correct answer if you like (as this is just an example), but this is the general idea on how to create a captcha field using what WP Contest Creator already provides to protect your list of subscribers and have successful campaigns.

Have more questions? Submit a request


Article is closed for comments.
Powered by Zendesk