<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Vortx Live Wire Blog &#187; Contact Form Spam</title>
	<atom:link href="http://blog.vortx.com/tag/contact-form-spam/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.vortx.com</link>
	<description>Vortx eCommerce Blog</description>
	<lastBuildDate>Fri, 03 Sep 2010 16:03:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Coder&#8217;s Corner &#8211; Stop Contact Form Spam</title>
		<link>http://blog.vortx.com/aspdotnetstorefront/coders-corner-say-goodbye-to-contact-form-spam/</link>
		<comments>http://blog.vortx.com/aspdotnetstorefront/coders-corner-say-goodbye-to-contact-form-spam/#comments</comments>
		<pubDate>Mon, 30 Mar 2009 23:35:53 +0000</pubDate>
		<dc:creator>Nicole S.</dc:creator>
				<category><![CDATA[AspDotNetStoreFront]]></category>
		<category><![CDATA[Cart Page Configs]]></category>
		<category><![CDATA[Coder's Corner]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[ADNSF]]></category>
		<category><![CDATA[Contact Emails]]></category>
		<category><![CDATA[Contact Form Spam]]></category>

		<guid isPermaLink="false">http://blog.vortx.com/?p=933</guid>
		<description><![CDATA[If you&#8217;re tired of wading through an inbox full of garbage to find legitimate emails from your customers, this quick fix will save the day!
If you&#8217;re using an older version of AspDotNetStorefront you&#8217;re probably overwhelmed with the junk mail coming through your built-in contact form on a daily basis.
You should upgrade. AspDotNetStorefront 8.0 is packed [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" style="margin-left: 4px; margin-right: 4px;" title="Intermediate Skill Level" src="http://blog.vortx.com/wp-content/uploads/2008/12/skilllevelintermediate.jpg" alt="" width="100" height="100" />If you&#8217;re tired of wading through an inbox full of garbage to find legitimate emails from your customers, this quick fix will save the day!</p>
<p>If you&#8217;re using an older version of <abbr title="ADNSF">AspDotNetStorefront</abbr> you&#8217;re probably overwhelmed with the junk mail coming through your built-in contact form on a daily basis.</p>
<p>You should upgrade. <abbr title="ADNSF">AspDotNetStorefront</abbr> 8.0 is packed with great new features, enhanced security, and a completely redesigned Admin interface that will make your life a lot easier. <a href="http://www.vortx.com/t-AspDotNetStoreFront-8-Upgrade-Information.aspx">Learn how to upgrade to <abbr title="ADNSF">AspDotNetStorefront</abbr> 8.0</a>.</p>
<p>If you&#8217;re not ready to make the change, here&#8217;s how to activate an incredibly helpful piece of code that will prevent a whole lot of junk mail from getting to your inbox.</p>
<p><span id="more-933"></span></p>
<p>In the latest <abbr title="ADNSF">AspDotNetStorefront</abbr> upgrade, I found this lovely bit of JavaScript that when added to your contact page will supply form validation. This means:</p>
<ul>
<li>The email address field will require a valid email address format and all fields will require information.</li>
<li>If a required field is missing information, the form will not be submitted and an error message will pop up instructing the user to &#8220;Please complete entries.&#8221;</li>
<li>If all fields contain information but the email address is invalid, it will pop up a message saying &#8220;Invalid Email.&#8221;</li>
</ul>
<p>This level of validation should be enough to stop those annoying spam-bots, but friendly enough that your customers will be able to complete the form accurately, in order to get their legitimate email on its way.</p>
<p><strong>Enabling JavaScript</strong></p>
<p>First of all, you should make sure that your topic pages in <abbr title="ADNSF">AspDotNetStorefront</abbr> allow scripts. Out of the box, you cannot add JavaScript to a contact page. If you try, and hit update at the bottom, your script will be erased.</p>
<p>To enable scripts:</p>
<ul>
<li>Go to the root of your site (your Web folder)</li>
<li>Open the RadControls &gt; Editor folder</li>
<li>Open the ConfigFile.xml file in your favorite text editor</li>
<li>search for &#8220;AllowScripts&#8221;</li>
</ul>
<p>You should find this line of code:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;AllowScripts&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>false<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/property<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Change the &#8220;false&#8221; to &#8220;true&#8221;, and upload this file to your site to the appropriate folder.</p>
<p>Now we should have access to add JavaScript code to topic pages through the HTML editor in admin.</p>
<p><strong>Installing Form Validation</strong></p>
<p>Log in to your admin site, and go to Misc &gt; Topics. Search for the contact form in the left navigation, and open it up. Now, let&#8217;s take a look at the source. You should see an icon in the toolbar that looks something like this: &lt;&gt;. Clicking that will allow you to view the HTML that&#8217;s creating the code.</p>
<p>Take a look at the code and see if you can find any &lt;script&gt; tags.</p>
<ul>
<li>If you can, then chances are you&#8217;re running a more recent version of <abbr title="ADNSF">AspDotNetStorefront</abbr> that already has this fix applied.</li>
<li>If you don&#8217;t see this, that means you&#8217;re either on an older version, or you recently upgraded to 8.0 and this fix wasn&#8217;t applied because it would have overwritten the changes you&#8217;ve made. Luckily, you can apply this fix without getting rid of the changes you&#8217;ve made to the form out of the box.</li>
</ul>
<p>In the HTML code, look for the opening &lt;form&gt; tag. It should look something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">form</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;MailArea&quot;</span> <span style="color: #000066;">action</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;sendform.aspx&quot;</span> <span style="color: #000066;">method</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;post&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">form</span>&gt;</span></pre></div></div>

<p>Directly after this you should see an opening and closing &lt;div&gt; tag. Within this tag, copy the following block of code in:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>function CheckFields<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #003366; font-weight: bold;">var</span> ergx <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> RegExp<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">''</span>\w<span style="color: #339933;">+</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #339933;">-+</span>.<span style="color: #3366CC;">''</span><span style="color: #009900;">&#93;</span>w<span style="color: #339933;">+</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">*@</span>\w<span style="color: #339933;">+</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #339933;">-</span>.<span style="color: #009900;">&#93;</span>\w<span style="color: #339933;">+</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">*</span>\.\w<span style="color: #339933;">+</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #339933;">-</span>.<span style="color: #009900;">&#93;</span>\w<span style="color: #339933;">+</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">*</span><span style="color: #3366CC;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;MailName&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">value</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">&quot;&quot;</span> <span style="color: #339933;">||</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;MailPhone&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">value</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">&quot;&quot;</span> <span style="color: #339933;">||</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;MailEmail&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">value</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">&quot;&quot;</span> <span style="color: #339933;">||</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;MailSubject&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">value</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">&quot;&quot;</span> <span style="color: #339933;">||</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;MailMessage&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">value</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">&quot;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Please complete entries.&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>return <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>ergx.<span style="color: #660066;">test</span><span style="color: #009900;">&#40;</span>document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;MailEmail&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">value</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Invalid Email.&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>return <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div>

<p>Now, scroll to the bottom of the form, still in the HTML window. The final piece of code that writes out the submit button will need to change. it should look something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;B1&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;submit&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Submit&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span></pre></div></div>

<p>Change that line of code to this:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">onclick</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;return CheckFields();&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;B1&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;submit&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Submit&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span></pre></div></div>

<p>And that&#8217;s it! Your submit button is now set to use the form validation javascript.</p>
<p>Click &#8220;update&#8221; to update the topic, and go take a look at your contact page on the front of your site.</p>
<p>Try to enter an invalid email format, or try to leave a field empty when you hit submit. It should pop up an error window instructing you to complete the fields, or to enter a valid email.</p>
<p>If it&#8217;s not working, go back to your topic in admin and make sure your script is still there. If it&#8217;s disappeared on you, you may need to restart your site, or reset the cache in admin to make sure the &#8216;AllowScripts&#8217; setting is enabled. Double check the ConfigFile.xml on your server to make sure the AllowScripts setting is set to true.</p>
<p>Now that you&#8217;ve gotten your junk mail under control, you may want to change the formatting of the emails you receive from the form. Take a look at <a href="http://blog.vortx.com/adnsf/coders-corner-aspdotnetstorefront-custom-contact-form-email/">this post</a> for instructions on changing the appearance of contact form emails.</p>
Written by Nicole<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fblog.vortx.com%2Faspdotnetstorefront%2Fcoders-corner-say-goodbye-to-contact-form-spam%2F&amp;title=Coder%27s+Corner+-+Stop+Contact+Form+Spam" ><img class="lightsocial_img" src="http://blog.vortx.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fblog.vortx.com%2Faspdotnetstorefront%2Fcoders-corner-say-goodbye-to-contact-form-spam%2F&amp;title=Coder%27s+Corner+-+Stop+Contact+Form+Spam" ><img class="lightsocial_img" src="http://blog.vortx.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.vortx.com%2Faspdotnetstorefront%2Fcoders-corner-say-goodbye-to-contact-form-spam%2F&amp;title=Coder%27s+Corner+-+Stop+Contact+Form+Spam" ><img class="lightsocial_img" src="http://blog.vortx.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fblog.vortx.com%2Faspdotnetstorefront%2Fcoders-corner-say-goodbye-to-contact-form-spam%2F&amp;headline=Coder%27s+Corner+-+Stop+Contact+Form+Spam" ><img class="lightsocial_img" src="http://blog.vortx.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Coder%27s+Corner+-+Stop+Contact+Form+Spam&amp;url=http%3A%2F%2Fblog.vortx.com%2Faspdotnetstorefront%2Fcoders-corner-say-goodbye-to-contact-form-spam%2F" ><img class="lightsocial_img" src="http://blog.vortx.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Coder%27s+Corner+-+Stop+Contact+Form+Spam&amp;u=http%3A%2F%2Fblog.vortx.com%2Faspdotnetstorefront%2Fcoders-corner-say-goodbye-to-contact-form-spam%2F" ><img class="lightsocial_img" src="http://blog.vortx.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Coder%27s+Corner+-+Stop+Contact+Form+Spam&amp;url=http%3A%2F%2Fblog.vortx.com%2Faspdotnetstorefront%2Fcoders-corner-say-goodbye-to-contact-form-spam%2F" ><img class="lightsocial_img" src="http://blog.vortx.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Coder%27s+Corner+-+Stop+Contact+Form+Spam&amp;url=http%3A%2F%2Fblog.vortx.com%2Faspdotnetstorefront%2Fcoders-corner-say-goodbye-to-contact-form-spam%2F" ><img class="lightsocial_img" src="http://blog.vortx.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Coder%27s+Corner+-+Stop+Contact+Form+Spam&amp;url=http%3A%2F%2Fblog.vortx.com%2Faspdotnetstorefront%2Fcoders-corner-say-goodbye-to-contact-form-spam%2F" ><img class="lightsocial_img" src="http://blog.vortx.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.vortx.com%2Faspdotnetstorefront%2Fcoders-corner-say-goodbye-to-contact-form-spam%2F&amp;title=Coder%27s+Corner+-+Stop+Contact+Form+Spam&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://blog.vortx.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fblog.vortx.com%2Faspdotnetstorefront%2Fcoders-corner-say-goodbye-to-contact-form-spam%2F" ><img class="lightsocial_img" src="http://blog.vortx.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fblog.vortx.com%2Faspdotnetstorefront%2Fcoders-corner-say-goodbye-to-contact-form-spam%2F" ><img class="lightsocial_img" src="http://blog.vortx.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fblog.vortx.com%2Faspdotnetstorefront%2Fcoders-corner-say-goodbye-to-contact-form-spam%2F" ><img class="lightsocial_img" src="http://blog.vortx.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://blog.vortx.com/aspdotnetstorefront/coders-corner-say-goodbye-to-contact-form-spam/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
