0

/t5/coldfusion-discussions/efficient-way-to-output-this-data-don-t-want-to-use-evaluate/td-p/359307
Jun 09, 2008
Jun 09, 2008
Copy link to clipboard
Copied
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
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
TOPICS
Advanced techniques
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
1 Correct answer
LEGEND
,
Jun 09, 2008
Jun 09, 2008
<cfoutput>
<cfloop from="1" to="2" index="ii">
#form["box" & ii]#<br />
</cfloop>
</cfoutput>
<cfloop from="1" to="2" index="ii">
#form["box" & ii]#<br />
</cfloop>
</cfoutput>
LEGEND
,
/t5/coldfusion-discussions/efficient-way-to-output-this-data-don-t-want-to-use-evaluate/m-p/359308#M32218
Jun 09, 2008
Jun 09, 2008
Copy link to clipboard
Copied
<cfoutput>
<cfloop from="1" to="2" index="ii">
#form["box" & ii]#<br />
</cfloop>
</cfoutput>
<cfloop from="1" to="2" index="ii">
#form["box" & ii]#<br />
</cfloop>
</cfoutput>
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

Guest
AUTHOR
/t5/coldfusion-discussions/efficient-way-to-output-this-data-don-t-want-to-use-evaluate/m-p/359309#M32219
Jun 09, 2008
Jun 09, 2008
Copy link to clipboard
Copied
Dan,
Thank you very much, I knew there was a quick and easy way to do it. Your the man!
Thank you very much, I knew there was a quick and easy way to do it. Your the man!
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

