• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

Guest
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
TOPICS
Advanced techniques

Views

252

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Jun 09, 2008 Jun 09, 2008
<cfoutput>
<cfloop from="1" to="2" index="ii">
#form["box" & ii]#<br />
</cfloop>
</cfoutput>

Votes

Translate

Translate
LEGEND ,
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>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 09, 2008 Jun 09, 2008

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation