Getting Around ColdFusion Form Validation
I read a posting on Ray Camden's blog called Fixing the Facebook Problem, and why one ColdFusion feature needs to die... and it occurred to me that there is a relatively simple way to get around this in a generic way.
The code below will essentially bypass ColdFusion's built-in Server-side Form Validation by hiding it in the URL struct while the server would do validation and then putting it back in the FORM struct before you need the data.
<cfcomponent output="yes">
<cfset this.name = "myApplication">
<cfset url.form = structnew()/>
<cfset structappend(url.form,form)/>
<cfset structclear(form)/>
<cffunction name="onRequestStart">
<cfset structappend(form,url.form)/>
<cfset structdelete(url,"form")/>
</cffunction>
</cfcomponent>
<cfset this.name = "myApplication">
<cfset url.form = structnew()/>
<cfset structappend(url.form,form)/>
<cfset structclear(form)/>
<cffunction name="onRequestStart">
<cfset structappend(form,url.form)/>
<cfset structdelete(url,"form")/>
</cffunction>
</cfcomponent>
This way, you don't need to know anything about the form field names of data coming in.
I hope it helps with your next facebook app. :) Jason

"We've built our entire product offering on this feature, what are your plans for improving it?"
That's when we're reminded that ColdFusion has hundreds of thousands of developers, and every feature in the product is being used somewhere.
The best thing for us to do is allow it to be disabled one release, and then possibly disable it by default but allow it to be turned back on for the next. In general, there is little to no harm in leaving something there for compatibility.
Maybe we will go through and kill a bunch of older features in ColdFusion 15. :)
Jason