Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<cfset lsBadWords = "thisbad1,bad2,bad3,bad4">
<cfset form.inputFieldName = "this is my list of bad words. thisbad1 is a very bad word. bad2 is even worse. bad 3 is not, but bad3 is!">
<cfoutput><p>#form.inputFieldName#</p></cfoutput>
<cfloop list="#lsBadWords#" index="iBadWord">
<cfset form.inputFieldName = replaceNoCase(form.inputFieldName,iBadWord,repeatString("*",len(iBadWord)))>
</cfloop>
<cfoutput><p>#form.inputFieldName#</p></cfoutput>
[b]SERVER SIDE CODE:[/b]
<cfset bad_words = "word1,word2,word3,word4,word5">
<cfif ListFindNoCase(bad_words,'#FORM.Name#')>
<cflocation url="page1.cfm?status=2" addtoken="no">
</cfif>
<cfif ListFindNoCase(bad_words,'#FORM.Email#')>
<cflocation url="page1.cfm?status=2" addtoken="no">
</cfif>
NOTE: The [COLOR=red]status=2[/color] is an indicator that bad words were used. So on "page1.cfm" you do a CFIF isdefined("status") and status=2 to send a proper message letting the user know to be nice