Copy link to clipboard
Copied
I use valuelist to display a list of values :
#valuelist(qry.qualifierText, ", ")#
However, it will display continually across the page until it runs out of room, then wraps to the next line and continue until done.
How can I define it so that it will display only five on one line, then skip and dispaly the next five, then skip, etc. until completed ?
Copy link to clipboard
Copied
Don't use valuelist. Use cfoutput query = yourquery. Use the mod operator to decide where to put your line breaks.
Copy link to clipboard
Copied
You could also get away with a crafty regular expression that places a "<br/>" just before every fifth comma. Something like this:
#ReReplace(sValueList, "(([^,]*,){5})", "$1<br/>", "all")#
Copy link to clipboard
Copied
Use arrays. "Lists" are faked with commas. ColdFusion does not have a genuine "list" data-type.