I did a simailar thing to replace < and > with space, and replace " with '
using a loop before the call to FormURL2Attributes:
<CFIF IsDefined('form.fieldnames')>
<CFLOOP INDEX="field" LIST="#form.fieldnames#">
<CFSET 'form.#field#' = Replacelist(Evaluate(field), '<,>,"', ' ,
,''')>
</CFLOOP>
</CFIF>
I don't know if this is the best way to do this sort of thing, but i didn't
want to mess with FormURL2Attributes.
And i suppose if i get the same sort of bugs then I'll just need to add a
trim to the one place..
Bert
> -----Original Message-----
> From: Jeff Johnson [mailto:[EMAIL PROTECTED]]
> Sent: 11 July 2000 17:33
> To: [EMAIL PROTECTED]
> Subject: auto trim of attributes.*
>
>
> I haven't used trim() around my form fields and now I'm
> getting bug reports from people that put single spaces in
> fields that should
> have real data. Rather than go through a lot of forms and
> try to find every place that needs a trim(), I thought I might just
> either modify FormURL2Attributes.cfm to trim all form and
> maybe url fields, or I could write a tag to do it and shove it into
> application.cfm. Any reasons why I shouldn't do this? Any
> better ideas?
>
> Thanks,
> Jeff
>
> --------------------------------------------------------------
> ----------------
> To Unsubscribe visit
> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=list
> s/fusebox or send a message to
> [EMAIL PROTECTED] with 'unsubscribe' in the body.
>
------------------------------------------------------------------------------
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.