Skip to main content
June 9, 2008
Answered

Efficient Way to output this data, don't want to use evaluate

  • June 9, 2008
  • 1 reply
  • 298 views
Hey everyone,
I have a form that creats field names with dynamic names, basically just a name like "Box" with a counter at the end so you end up with "Box1" "Box2" "Box3". How can I easily output all the information contained in this form, since I would end up having to have something that looks like #form.box#counter## that doesn't work. I tried using array notation like #box # (when in a loop, using i as a counter) but got an error about java lang crap. What would be the easiest way to do this? Attached is a picture of a dump of the form after it is submitted so you can kinda see what I am talking about (note: there are two of these types of boxes in the picture show, one that tracks the ID of the item, and another that tracks the person they want to assign that item to) Thanks!


Form Output Dump
This topic has been closed for replies.
Correct answer Dan_Bracuk
<cfoutput>
<cfloop from="1" to="2" index="ii">
#form["box" & ii]#<br />
</cfloop>
</cfoutput>

1 reply

Dan_BracukCorrect answer
Inspiring
June 9, 2008
<cfoutput>
<cfloop from="1" to="2" index="ii">
#form["box" & ii]#<br />
</cfloop>
</cfoutput>

June 9, 2008
Dan,
Thank you very much, I knew there was a quick and easy way to do it. Your the man!