You have an argument with the name 'form'. Your var scoped variables cannot
be of the same name as your argument variable.

Thanks



On 3/6/07, Will Tomlinson <[EMAIL PROTECTED]> wrote:
>
> I haven't built a simple udf in forever, but decided to do one for my
> trimming of formfields. I tried sticking a <cfset var form = ""> right above
> the loop, but I get an error:
>
> Cannot declare local variable FORM twice.
>
> <cfcomponent>
>         <cffunction name="cleanFormfields" access="public"
> returntype="struct">
>                 <cfargument name="form">
>                     <cfloop list="#ARGUMENTS.FORM.fieldnames#"
> index="thisfield">
>                <cfset FORM[thisfield] = Trim(ARGUMENTS.FORM[thisfield])>
>            </cfloop>
>                 <cfreturn form>
>         </cffunction>
> </cfcomponent>
>
> Am I not supposed to var this one?
>
> Thanks,
> Will
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 and Flex 2 
Build sales & marketing dashboard RIA’s for your business. Upgrade now
http://www.adobe.com/products/coldfusion/flex2

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:271814
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to