Possibly. With my limited interpretation of what you're doing....
<cfset FriendlyFormFieldNames = "First Name,Last
Name,Password,Email..."> <cfset variables.resub = 0> <cfset fieldCount =
0>
<cfloop collection="#form#" item="field">
<cfset fieldCount = fieldCount + 1>
<cfif form[field] eq "">
<cfset variables.resub = variables.resub + 1>
<cfset variables.emptymsg = variables.emptymsg &
"<li>#ListGetAt(FriendlyFormFieldNames, fieldCount, ",")#</li>">
<cfelse>
<cfset variables[field] = form[field]>
</cfif>
</cfloop>
Steve "The Boss" Brownlee
http://www.orbwave.com/cfjboss
-----Original Message-----
From: Jeff Sabarese [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 23, 2006 2:30 PM
To: CF-Talk
Subject: Series of CFIF's as array: less code
hello. from what i can figure, i think that this bit of code i've posted
below, excluding the extended part about invalid email, could be
entirely duplicated by looping through an array... right?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:241249
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