I'd do something like this.
FORM
<cfcfquery query="yourQuery">
<input name="something_#yourQuery.CurrentRow#" type="text" />
/cfqueryloop
<input name="numberOfRows" value="#yourQuery.RecordCount#" type="hidden" />
ACTION PAGE
<cfoutput>
<cfloop from="1" to="#FORM.numberOfRows#" index="i">
<p>#i#. FORM.something_#i# = #FORM["something_" & i]#</p>
</cfloop>
</cfoutput>
Or something simliar.
As an aside, whenever you seen values like 1,2,3,4 in the form scope, it
usually means you have more than one field with the same name being
submitted. Not always a bad thing if that's what you want.
Adrian
-----Original Message-----
From: Renee Spadaro
Sent: 28 January 2008 16:31
To: CF-Newbie
Subject: Re: Java object error
Hi Adrian and CS,
It does make sense and I had that (<input type="text"
name="earnings_#yourQuery.CurrentRow#" />) as a hidden field to capture the
row number. But I had the name as "RecordID" and the value
as"#getData.Earnings#". I made it a text field but I still have the same
problem. Then I changed the value to "Earnings_#getData.CurrentRow#" as you
suggested. Still doesn't work.
I changed the submit button to be a button and got rid of the image and that
helped.
I'm just not getting it. This is what I get when I submit the form. And to
top it all off, the values in earnings (0,9876) are pulled from the
database. I've been changing them to 1234 and 5678 but you can see it's not
capturing that when the form is submitted.
struct
CYEID 57,70
EARNINGS 0,9876
FIELDNAMES RECORDS,PROCESSLEVEL,FORMACTION,EARNINGS,RECORDID,CYEID,SUBMIT
FORMACTION Save
PROCESSLEVEL 9999
RECORDID Earnings_1,Earnings_2
RECORDS 2
SUBMIT Submit
Maybe it's the <cfloop>.
They should change this mailing list to 'call me stupid'.
Thanks,
Renee
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w
Archive:
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:3282
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15