Page 1 of 1

Contact Us Form

PostPosted: Thu Mar 27, 2014 10:58 am
by xylemdesign
Hello,

I was wondering If anyone out there has added a contact form to their site that filters our spam bots. The previous developer/developers of the sites I'm running simple pasted email addresses onto the site without any consideration of spam bots, so as of now our customer service inbox is jam packed with spam. Is there any templates out there for a contact us form? Maybe one with a honeypot built in?

Re: Contact Us Form

PostPosted: Thu Mar 27, 2014 3:35 pm
by ShopSite Lauren
You can contact your host. Most hosting providers have some sort of formmail file on all hosted accounts (or can easily be added) for you to easily add a contact form onto your website and have the emails sent via your hosts mail server.

One other option, instead of just printing the email addresses on your website using the link: <a href="mailto:emailaddress@domain.com">emailaddress@domain.com</a>, you could print the same address with JavaScript, and that is not readable by spam bots. Below is some JavaScript you can use on your website in place of email addresses:

<script type="text/javascript">
var stb_domain="domain.com"
var stb_user="emailaddress"
var stb_recipient=stb_user+"@"+stb_domain
var stb_url="mailto:"+stb_recipient
document.write(stb_recipient.link(stb_url));
</script>

Replace emailaddress with everything BEFORE the @ sign in your email address.
Replace domain.com with everything AFTER the @ sign in your email address.

For example, if your email address were john@candlestore.com, the code would look like:

<script type="text/javascript">
var stb_domain="candlestore.com"
var stb_user="john"
var stb_recipient=stb_user+"@"+stb_domain
var stb_url="mailto:"+stb_recipient
document.write(stb_recipient.link(stb_url));
</script>