Count the number of values selected in a form
Hello
I need to count the number of values selected in a form.
Here is my form dump:

I want to count the values circled in red.
So the number I want in this case is 5.
Any suggestions?
Hello
I need to count the number of values selected in a form.
Here is my form dump:

I want to count the values circled in red.
So the number I want in this case is 5.
Any suggestions?
Aegis,
Yeah, good point. Here is a minor tweak:
<cfset total = 0>
<cfloop collection="#FORM#" item="field">
<cfif field NOT IS "fieldnames">
<cfset total += ListLen( FORM[ field ] )>
</cfif>
</cfloop>
<cfoutput>
<p>Total: #total#</p>
</cfoutput>
-Carl V.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.