On Mon, Feb 11, 2013 at 1:45 PM, Rick Faircloth <r...@whitestonemedia.com>wrote:
> > After more unsuccessful testing, I'm assuming that the form > button at the end of the form needs to be an actual button with > a type of "submit" to work with CFFormProtect? > > Not as far as I know. I'm a bit rusty on the API, but here is how BlogCFC uses it: <cfif application.usecfp and not isLoggedIn()> <cfset cffp = createObject("component","cfformprotect.cffpVerify").init() /> <!--- now we can test the form submission ---> <cfif not cffp.testSubmission(form)> <cfset arrayAppend(aErrors, "Your comment has been flagged as spam.") /> </cfif> </cfif> If for some reason your Form struct wasn't, well, the Form, but it was somewhere else, you would just pass that data in. I *believe* it does look at somethings in terms of a form post, but it isn't tied to just that. > If so, this won't work because I don't use an actual button with > a type of "submit". The "submit" button for my form is just a regular > button that triggers an AJAX function that sends the data to a CFC > for further processing and then submission in the CFC to Authorize.net. > > If I put: > > <cfset Cffp = CreateObject("component","cfformprotect.cffpVerify").init() > /> > > <cfif Cffp.testSubmission(form)> > > > Even when I know the form values are correct, I get the > failed notices at the end. So somehow the form values aren't > passing the tests for CFFormProtect. > > I see there's mention of logFailure() and 'logFailedTests' and logFile' > in the notes, but I haven't figured out where to use those. > > I'd figure it out. ;) Also, have you tried contacting the project admin? > http://cfformprotect.riaforge.org/ > -- =========================================================================== Raymond Camden, Adobe Developer Evangelist Email : raymondcam...@gmail.com Blog : www.raymondcamden.com Twitter: cfjedimaster ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:354462 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm