Hi Scott,
We use something like this

<cfset CheckboxArray = ArrayNew(1)>
<cfloop index="i" from="1" to="#number_of_checkboxes#">
        <cfset CheckboxArray[i] = "">
</cfloop>
<cfloop query="get_values">
        <cfset CheckboxArray[get_values.checkresults] = "checked">
</cfloop>
<cfoutput>
<input type="checkbox" name="box" #CheckboxArray[1]# value="1"> 
<input type="checkbox" name="box" #CheckboxArray[2]# value="2">
<input type="checkbox" name="box" #CheckboxArray[3]# value="3">
<input type="checkbox" name="box" #CheckboxArray[4]# value="4">
:    :    :    :   :   :   :   :   :    :   :    :   :   :   :
:    :    :    :   :   :   :   :   :    :   :    :   :   :   :
:    :    :    :   :   :   :   :   :    :   :    :   :   :   :
:    :    :    :   :   :   :   :   :    :   :    :   :   :   :
:    :    :    :   :   :   :   :   :    :   :    :   :   :   :
<input type="checkbox" name="box" #CheckboxArray[n]# value="n">
</cfoutput>

Hope this helps.
Regards,
Anthony Geoghegan.
Lead Developer,
What's On Where (WOW!)
http://www.wow.ie
mailto:[EMAIL PROTECTED]



-----Original Message-----
From: Scott Weikert [mailto:[EMAIL PROTECTED]]
Sent: 19 October 2000 22:13
To: CF-Talk
Subject: <CFINPUT> fill-in-the-value question


How, pray tell... when one has several CFINPUTS that are checkboxes, named
the same but with different numeric values... if one should have a list of a
portion of those values... does one tell a <CFINPUT> tag to check that list
against the value of the current checkbox field, and check it should it find
a match?

Obviously one can't put a <CFIF> inside a <CFINPUT> to check and spit out
"checked" if it finds it... any thoughts?
------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]

Reply via email to