Where to put custom function at?
Let's say I make a custom function, do I make it a CFC or a tag?
Here is some sample code (I put in bold my function call)
<cfif IsDefined("form.submit")>
<cfset data.comment = Trim(HTMLEditFormat(form.comment))>
<cfset data.name = Trim(REReplace(form.name, "[^A-Za-z0-9 ]", "", "all"))>
<cfset data.location = Trim(CustomFunction(form.location))><!--- where to put it? as cfc or as a tag? --->
<cfif data.comment NEQ "">
<cfif data.name EQ "">
<cfset data.name = "Anonymous">
</cfif>
<cfinvoke
component="guestbook.cfc.db"
method="insert_comment">
<cfinvokeargument name="form_data" value="#data#"/>
</cfinvoke>
<cfelse>
<cfset message="Comment is required!">
</cfif>
</cfif>
