<cfloop from="1" to="#form.numtitles#" index="x">
    <cfset OTitle = "title#x#">
    <cfoutput>#form["OTitle#x#"]#</cfoutput></br>
</cfloop>


Like that...note, i'd use a hidden form var called numtitles to store the number of titles, in case you have other form controls.


Doug

-----Original Message-----
From: Asim Manzur [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 03, 2004 3:57 PM
To: CF-Talk
Subject: Dynamic form output

I have a dynamic populated form

<form>
    <cfloop from="1" to="#StructCount(lines)#" index="counting">
        <input type="text" size="55"
name="title<cfoutput>#counting#</cfoutput>"
value="<cfoutput>#lines[counting]['title']#</cfoutput>">
    </cfloop>
</form>

when I dump that page it give me form fields with the values from 1 to 10

title1
title2
title3
......
title10

how I can output the result of those form variables dynamically

<cfloop from="1" to="#Evaluate(StructCount(form))#" index="x">
    <cfset OTitle = "title#x#">
    <cfoutput>#OTitle#</cfoutput>
</cfloop>

that give me "title1" output i need the value of title1

if I directly output title1 it displays the value.

thanks alot
  _____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to