Hi all
I need to delete all spaces between words inside form fields. Please
look this simple code included in application.cfm:
<!--- FORM structure exists and haves content--->
<cfif NOT isEmpty("FORM")>
<cfoutput>
<cfloop list="#form.fieldnames#" index="i">
<!---update all form fields with spaces for your new value without
spaces between--->
<cfscript>
<!---change all 2 spaces for only one space--->
StructUpdate(form, #i#, Replace(#StructFind(form, '#i#')#,' ',' ','All'));
</cfscript>
</cfloop>
<cfdump var="#FORM#">
</cfoutput>
</CFIF>
Testing with cfabort show me all form fields without spaces. Using Len
after and before show me a correct length. But after insert in DB with
SP or simple INSERT with queries all form fields continue with
spaces....
What's wrong?
Thanks for your time.
MD.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:210991
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54