I have a relatively simple contact form on a wordpress website. I have been getting floods of spam recently. I’m concerned about implementing a captcha for conversion reasons. All of the spam entries have a website url (either “http://” or “www.”) at least once in the contact form submittal.
Is there a way to prevent the form from executing (hence, I won’t receive an email) if “http://” or “www.” is submitted on the contact form?
Can anyone tell me how to implement this code?
Why don’t you just try to install captcha system. reCAPTCHA is very popular. In WordPress you can add it by simply install plugin for it WP-reCAPTCHA
Sure. You will need to locate the code or method that handles or processes the incoming form data. Next all you would need to do is interrupt the process.
Lets say the current processing looks like this.
Get in the way of the handling if ‘http://’ or ‘www.’ are found in the message.
Of course this is highly dependent on how the data is being processed, and what you want the result to be to a user that posts such data to be. But then again, you didn’t post any code at all.