[thelist] CF Question

Chris Evans chris at fuseware.com
Fri May 12 08:05:27 2000


Amy,

  In your example code below, you are setting your hidden form fields name
to "hidden name".  So every hidden input has the same name.  It looks as
though you need to use <input type="hidden" name="#hidden_name#"
value="#reader_id#"> instead.


Chris Evans
chris@fuseware.com
http://www.fuseware.com


-----Original Message-----
From: thelist-admin@lists.evolt.org
[mailto:thelist-admin@lists.evolt.org]On Behalf Of Thompson, Amy
Sent: Thursday, May 11, 2000 3:31 PM
To: 'thelist@lists.evolt.org'
Subject: RE: [thelist] CF Question


Thank you for all of the suggestions, unfortunately the problem still is
unresolved.  To give some more background, here is what I am trying to do:

I am using <cfoutput query> within my form to loop through a result set and
display each row.  I do not want to show the primary key for each row to the
user, but I do want to keep it with its corresponding row for use on my
action page. So I am currently putting the primary key field into a hidden
input tag. ex.  <input type="hidden" name=hidden_name value="#reader_id#">
hidden_name has been previously defined as <cfset hidden_name="reader_id" &
Query_name.CurrentRow>, the intention being that it will change with each
pass through the result set.  The problem I am finding is that this hidden
field occurs in each one of three nested <cfif>'s.

ex.  <cfoutput query>
		<cfif condition>
			display specific column data
  			<input type="hidden" name=hidden_name
value="#reader_id#">
				<cfif condition>
					display specific column data
					<input type="hidden"
name=hidden_name value="#reader_id#">
						<cfif condition>
							display specific
column data
							<input type="hidden"
name=hidden_name value="#reader_id#">


When I call form.hidden_name on my action page, I get a concatenated list of
all reader_id's.  It just seems to be appending each one on to the end of
the current hidden_name value.  This is also happening with my checkboxes
and radio buttons.  I need to display them for each individual record and
since it is in a <cfif> tag, I am not sure how to name them.

Any suggestions would be extremely helpful.

thanks, amy






-----Original Message-----
From: Walker, Matthew [mailto:Matthew.Walker@cdc.org.nz]
Sent: Wednesday, May 10, 2000 5:51 PM
To: 'thelist@lists.evolt.org'
Subject: RE: [thelist] CF Question


> that will work if you're setting them all to the same value.

Oh I didn't even realise it was an UPDATE SQL statement. However, Amy *is*
setting them all to the same value. I find it's handy in debugging to
<cfoutput> the content of the SQL just before the <cfquery>. It's an easy
way to pick up "silly" mistakes. Also, you can turn on the facility in CF
Administrator to output the contents of all queries, and various other
things.

Regards,
Matthew Walker
Canterbury Development Corporation
Christchurch, New Zealand
Tel +64-3-379 5575

---------------------------------------
For unsubscribe and other options, including
the Tip Harvester and archive of TheList go to:
http://lists.evolt.org Workers of the Web, evolt !

---------------------------------------
For unsubscribe and other options, including
the Tip Harvester and archive of TheList go to:
http://lists.evolt.org Workers of the Web, evolt !