Copy link to clipboard
Copied
I am attempting to create a table of checkboxes 4 checkboxes wide with about 40 possible query rows to output.
I'd like to <cfnext> my cfloop after outputting each <td> in a row, but I don't see a way to do that. I haven't even begun to think about how I will read this back in my action form and update the database. I am considering giving up on it as not possible in ColdFusion.
Any helpful information would be appreciated.
Copy link to clipboard
Copied
It sounds like you want to use nested loops. Something like this:
checkboxes = "f1,f2,f3,f4";
<cfoutput query="yourQuery">
<tr>
<cfloop list="#checkboxes#" index="ThisCheckbox">
<td>
<input type="checkbox" name="checkbox#idFieldInYourQuery#" value = "#yourquery[ThisCheckBox][currentrow]#"> #SomethingElseFromYourQuery#
</td>
</cfloop>
</tr>
</cfoutput>
Copy link to clipboard
Copied
Thanks for the input. I found another solution searching google. Conditionally closing and opening the table row based on RecordCount MOD 4 EQ 0.
Copy link to clipboard
Copied
Sounds like I misinterpreted your question.
You figured out how to process them yet?