Sep
22nd
WordPress Contact Form with Spam Protection
All of a sudden, I was getting a HUGE volume of Contact Form spam using Ryan Duff’s great WordPress Contact Form plugin.
I’ve left comments on Ryan’s site and IM and told him that I was able to fix the issue by adding a Challenge Question, but I can’t seem to get in contact with him. So… here’s Ryan’s plugin with the new and improved Spam Protection. I am using it on my site and it’s working great.
The Plugin can now be downloaded via the Project Page: WordPress Contact Form with Spam Protection Plugin Project Page

Douglas Karr
Yours is an elegant, neat enhancement and I reckon Ryan should adopt your mod and give you co-credit for taking the plugin further in such a useful way.
So yeah. Thank you! The contact form looks just how I want it to now. x
When I read the book Crypto, one of the key pieces of it was how you could pass a piece of information between 2 people that solved a problem… without someone in the middle able to figure it out.
The problem with most ’spamware’ is that a computer calculates the challenge question. That’s an inherent flaw, because it will be a computer that tries to break it.
By making the challenge question a visible aspect of my page in English, I’m avoiding the computer question and solution. And… just to make sure, I allow the person to change the question and answer any time they want.
I think it’s a great model and I hope to put it on my comments next. I get a ton of spam on my comments but have not received a single piece of SPAM on my contact form.
Appreciate your kind comments!
Doug
Simple to install and works with no confusing set up.
This form may end up being the single driving force behind my FINALLY getting around to updating my personal blog at joniverse.com from WP 1.5.x to WP 2!
Thanks.
thanks
I have tried using Ryan Duff’s original WP Contact Form, but always experienced errors with my blog (granted, probably a theme conflict). And the Phrixus WP Plugin never worked either.
What did you do? Why does it work? Why?
Anyways, thanks man! A donation is on it’s way.
The file is there now. You happened upon the site as I was moving around some domains. I also sent you a note via email that the file is there now.
Doug
At one time I couldn’t get it to work, but it seems to work now! That’s great! At first, Bad Behavior blocked me from my site. I can’t believe it! It seems quite aggressive so I’ve added my own ip address to the whitelist since I couldn’t get a hold of the developer at all (all emails are bounced back).
Hopefully I can lessen the amount of spam emails I get from the contact form. I will periodically change the challenge question to thwart those human spammers that read.
Time will tell whether this is a good deterrant. I am keeping my fingers crossed. Thanks for the great plugin!
http://www.ans-online.nl/anstiplijn
I’ve modified the plugin and added a table layout version. I ran into the same issues that you did and I gave up on trying to make it using CSS/HTML. Sometimes tables are the best approach.
Doug
The styles are applied at the beginning of this same wp-contactform page, where you’ll see a few lines that contain lengths for the textareas. This is where you can add the style to the submit button. (I hope all this makes sense). I haven’t tested the following style changes across all browsers and all resolutions, but it seems fine in both Firefox and in IE. If you test it and find a quirk, please let me know:
/* Begin Contact Form CSS */
.contactform {
position: static;
overflow: hidden;
}
.contactleft {
width: 25%;
text-align: right;
clear: both;
float: left;
display: inline;
padding: .4em;
margin: .5em 0;
}
.contactright {
width: 70%;
text-align: left;
float: left;
display: inline;
padding: .4em;
margin: .5em 0;
}
.contacterror {
border: .1em solid #ff0000;
}
.contactsubmit {
text-align:center;
}
/* End Contact Form CSS */
When I use the contact form, I get overlapping text, the name, etc is higher than the box, and the user can’t enter any data in the text box.
Is there any way anyone could help? Here is what it looks like:
http://www.michelledear.com/?page_id=48
I did make sure to clean up anything that was listed per the “if you are using a previous version” information.
Any help would be greatly appreciated.
Thanks!
Michelle Dear
I was irritated by CSS issues as well and gave up! You’ll see a second link up there with a table-based layout. Maybe that will fix it?
Now you can contact me!
And thanks for the kudos. Feel free to browse. Let me know what you think.
Michelle Dear
I’ve just instaled and activated your great plugin, created a Contact page, but, what need i to make for the contact form appear on my contact page, need i to insert some piece of code? and if yes, where? and or how?
I’ve read the readme file searching by instructions, but, it’s nothing useful there.
Sorry but i am a newby, can you explain step by step, please.
Thank you
Dr PennyStock
No problem! Build yourself a new page and then add the following snippet where you would like the form to show up:
<!–contact form–>
Be sure to setup the options for the form!
Doug
Cheers
Dr PennyStock
Thanx for making it
I’ve tried tons of contact forms but none of them worked on Godaddy except this one!!! It totally rocks. Also, the challenge question entry on the form can handle images! Check out my website where I basically put in a captcha image in an attempt to look more professional. Truly great, thanks very much!
It was really easy. Create a small captcha-type picture with a few characters just to look legit. Feel free to copy mine and upload it. Then go into the wp-admin->options->contact form.
In the “What is your challenge question?” text box here is what I put:
Word verification: (img style=”float:right;” src=”http://www.yoursite.com/images/captcha.jpg” border=”0″ alt=”"Word verification: Please enter these letters into the text box to the right of the picture.” )
replace “)” with “>” of course!
Whatever the text in the image is put that into the “correct response” text box. Save by hitting “Update options” and you are done.
If there is somehow ever a spam problem then you just change the picture and the correct response. I hope that works out for you and good luck with your client.
I think Wordpress is re-writing your post a bit. The code to include the contact form is similar to an HTML comment, using two ‘dashes’. The code on this site that I copied & pasted was an emdash instead! People copying and pasting will find that the emdash won’t work…