I have a contact form on a site that is getting hit over and over with spam 
submissions.  It is not going to the contact, as whatever is filling out the 
form is leaving out a required value.  But my error trapping is sending me an 
email, and I'm getting sick of it.

The spam submissions are coming from different ips so I can't block based upon 
that.

I am checking to see if the form field is blank, but I am still getting the 
error email.  I've got something wrong.  Any help?

It's a fusebox 3 app so I have pulled the code from a couple of files, but the 
flow should be correct.  The form field left unselected is "contactmeby".  It 
is a select drop down, so I should still be getting an empty value, correct?  I 
am gettting an undefined error, I don't understand how this could be happening:
Expression Element CONTACTMEBY is undefined in ATTRIBUTES. [empty string] 0 
[empty string] [empty string]

Here is the code that should be catching it:

<cfparam name="attributes.errorlist" default="">
<cfif isdefined("form.fieldnames")>
 <cfif not len(attributes.name)>
  <cfset attributes.errorlist = "name">
 </cfif>
 <cfif not len(attributes.email)>
  <cfset attributes.errorlist = listappend(attributes.errorlist, "email")>
 </cfif>
 <cfif not len(attributes.phone)>
  <cfset attributes.errorlist = listappend(attributes.errorlist, "phone")>
 </cfif>
 <cfif not isdefined("attributes.contactmeby") or not 
len(attributes.contactmeby)>
  <cfset attributes.errorlist = listappend(attributes.errorlist, "contactmeby")>
 </cfif>
 <cfif not len(attributes.errorlist)>
  <cfinclude template="act_contactmailer.cfm">
 </cfif>
</cfif>


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317116
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to