If you are still interested, I tested and debugged it:
<cffunction name="CleanForm" returntype="boolean" output="false">
<cfargument name="stForm" required="yes" type="struct">
<cfargument name="extension" required="no" default="_asim"
type="string">
<cfset var key = "">
<cfset var newkey = "">
<cfset var value = "">
<cfset var fieldnames = "">
<cfif Len(extension) AND NOT StructIsEmpty(stForm)>
<cfloop list="#StructKeyList(stForm)#" index="key">
<cfif key NEQ "fieldnames">
<cfset newkey =
REReplaceNoCase(key,"#extension#$","")>
<cfif newkey neq key>
<cfset value = stForm[key]>
<cfset StructDelete(stForm,key)>
<cfset stForm[newkey] = value>
</cfif>
<cfset fieldnames =
ListAppend(fieldnames,newkey)>
</cfif>
</cfloop>
<cfset stForm.fieldnames =
ListSort(fieldnames,"textnocase")>
</cfif>
<cfreturn true>
</cffunction>
Pascal
> -----Original Message-----
> From: Asim Manzur [mailto:[EMAIL PROTECTED]
> Sent: 14 December 2004 18:29
> To: CF-Talk
> Subject: Re: <QUERY2FORM>
>
> Hi
> that was the problem
> the table field was named bill_date
> and your function works fine only had the problem with cleanForm
>
> but I have changed the field name in the table
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:187603
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54