Thanks Phil!
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Phillip Holmes
Sent: Tuesday, November 16, 2004 11:50 AM
To: [EMAIL PROTECTED]
Subject: RE: count check boxes
Ron,
If you have checkboxes of different names, you could simply setup a
prefix
schema and loop over the form like so.
This way you get it all in one shot:
<form action="self.cfm" method="post">
<input type="checkbox" name="check_one"><br>
<input type="checkbox" name="check_two"><br>
<input type="checkbox" name="check_three"><br>
<input type="checkbox" name="check_four"><br>
<input type="hidden" name="submitted">
<input type="submit">
</form>
<cfscript>
if(IsDefined("submitted")) {
i=0;
for(it in form) {
if(it CONTAINS "check_") {
i=i+1;
}
}
}
WriteOutput(i);
</cfscript>
---
[This E-mail has been scanned for viruses.]
----------------------------------------------------------
To post, send email to [EMAIL PROTECTED]
To unsubscribe:
http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
To subscribe:
http://www.dfwcfug.org/form_MemberRegistration.cfm
----------------------------------------------------------
To post, send email to [EMAIL PROTECTED]
To unsubscribe:
http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
To subscribe:
http://www.dfwcfug.org/form_MemberRegistration.cfm