3 Replies Latest reply on Nov 15, 2009 11:41 AM by -==cfSearching==-

    Looping and incrementing FORM.Value_#

    Fatlipcdn

      Good day,

       

      First time poster here, so be easy on me.

       

      This seems like an easy enough thing. I think I am just having a brainfart because it's Sunday.

       

      Anyways, I have a form that loops a query that increments form values:

       

      value_1

      value_2

      value_3

       

      etc

       

      When the form is submitted, I want to loop through a predetermined number and set my variable to something like this, but I can't get it to work:

       

      <cfloop from="1" to="#FORM.number#" index="agi">
      <cfset myvar = FORM.value_#agi#>

       

      </cfloop>

       

      I am sure it is just a syntax issue, but like I said, it's Sunday

       

      Ideas?

       

      TIA,

      Greg