These are 2 cool tools that you can use for your forms to escape spam.
1) reCAPTCHA
This is my top most recommendation, is a google product, which is tough on bots and easy on humans. This will protect any website from spam and letting real people pass through with ease. reCAPTCHA is also an absolute free service from Google. It uses an advanced risk analysis engine and adaptive CAPTCHAs to keep automated software from engaging in abusive activities on your site.
2) Akismet
Akismet is an advanced hosted anti-spam service. This database for identification was build with course over years of data from millions of sites that uses their service. Its a real time process. And it learns and learns to identify new spam contents every single second of every single day.
-----------------------------------------------
These 2 are the most effective ones and are easily configurable on any framework. Wordpress have the Akismet as default. The one you see on this site is the reCaptcha and is the top recommendation.