Menu
Web Host Pro Logo
  • Home
  • News
  • Servers
  • Websites
  • WordPress
  • Business
Web Host Pro Logo
December 17, 2014

Form mail spam blocker

Share it here

We found this great trick to block most spam for any form mail type form.

Just paste this right above the submit button in the code:

 

<div id=”fooDiv”>
<label for=”foo”>Leave this field blank</label>
<input type=”text” name=”foo” id=”foo”>
</div>
<script>
(function () {
var e = document.getElementById(“fooDiv”);
e.parentNode.removeChild(e);
})();
</script>

 

 

The will eliminate almost all spam and the form will still work as normal. You can add a Captcha for the best possible protection but this is much easier and works very well.

Continue Reading

← How to choose what picture type for your website in 2014
Whitelist your email the professional way →

Connect with us
WordPress

Web Host Pro websites, vps, and servers

Recent Posts

  • What Is a Dedicated Server?

    What Is a Dedicated Server?

  • System Admin Services for cPanel-Based Servers

    System Admin Services for cPanel-Based Servers

  • Web Host Pro Reseller Hosting

    Web Host Pro Reseller Hosting

  • Free Website, DNS, Email, and Network Tools from Web Host Pro

    Free Website, DNS, Email, and Network Tools from Web Host Pro

  • The New Acronym Reshaping Big Tech in the AI Era

    The New Acronym Reshaping Big Tech in the AI Era

  • How to sell things online

    How to sell things online

  • The Rules for Success in 2026

    The Rules for Success in 2026

  • Cloud Hosting Explained

    Cloud Hosting Explained

  • Top 3 Myths About the Web Hosting Industry

    Top 3 Myths About the Web Hosting Industry

  • The New Era of Data Center Careers

    The New Era of Data Center Careers

  • Most popular web builder

    Most popular web builder

  • Do We Still Need “http://”?

    Do We Still Need “http://”?

  • How to Start a WordPress Blog in 2026

    How to Start a WordPress Blog in 2026

  • WordPress Load Control

    WordPress Load Control

  • How to Add Video to WordPress in 2026

    How to Add Video to WordPress in 2026

Popular Posts

Log in
All Rights Reserved Web Host Pro 2001-2026