If you output #GetFields.FieldName# for each iteration of the loop you will undoubtedly find that two or more values are the same, which you can't have if you are using this to name form controls
-----Original Message----- From: Adrian Lynch [mailto:[EMAIL PROTECTED]] Sent: 26 April 2002 17:47 To: CF-Talk Subject: RE: Variable names in CFINPUT take it out of the cfinput and see what it's producing -----Original Message----- From: Thane Sherrington [mailto:[EMAIL PROTECTED]] Sent: 26 April 2002 17:33 To: CF-Talk Subject: RE: Variable names in CFINPUT At 05:16 PM 4/26/02 +0100, Adrian Lynch wrote: >post more of your code please I'll have to get it from home. Basically, I have a set of variable names and values that I get from a query. So it's something like this: <CFQUERY name="GetFields" datasource="#dsn#"> SELECT FieldName FROM Fields WHERE TableID=#TableID# </CFQUERY> <CFLOOP Query="GetFields"> <CFQUERY name="GetValues" datasource="#dsn#"> SELECT #GetFields.FieldName# FROM #TableName# WHERE ID=#ID# </CFQUERY> <CFSET DefaultValue=evaluate("GetValues.#GetFields.FieldName#")> <CFINPUT Name="#GetFields.FieldName# value="#DefaultValue#"> </CFLOOP> I'd like it to loop through the inputs and create a form, but it gives the error about duplicate names, even though the names are different (though the variable name is the same.) T ______________________________________________________________________ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists