form.fieldnames will give you the list of fields of the submitted form,
regardless of how they were created.

You could also use checkboxes, which will return a comma-delimited list.

cf_code (simplified)

<cfquery>
select * from names
</cfquery>
<cfform>
Who woule you like to fire?
<cfoutput>
#emp_name# <cfinput type = "checkbox" name="ckFireList" value =
"#emp_name#">
</cfoutput>
<input type = "submit" value = "submit">
</cfform>

Then, form.ckFireList will give you a list like "roy,billy,gus" which you
can loop through.



-----Original Message-----
From: Gavin Myers [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 02, 2000 2:31 PM
To: CF-Talk
Subject: dynamic form


this is buggin' me
okay, lets say the database consists of:

emp_name
roy
joe
billy
gus


cf_code (simplified)

<cfquery>
select * from names
</cfquery>
<cfform>
Who woule you like to fire?
<cfoutput>
#emp_name# <cfinput type = "radio" value = "0">No<cfinput type = "radio"
value = "1">Yes
</cfoutput>
<input type = "submit" value = "submit">
</cfform>


In order for this to work i have to specify a name so my radio buttons will
work. In order to give my radio buttons a name i have to give them a dynamic
name (like #emp_name#)

so when i go to my next page, how do i call those dynamic set feild names?

like #form.#emp_name##?

know what i mean?
----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to