Hello,
I have a RATE form that first asks "how many rates will you
be adding?" that answer generates a series of form elements based
on the answer. You then have a form grid to populate, 3 values for
each rate (price, code, name).
This part works fine. The issue is now I need to INSERT the
values into the table, so I need to use the INDEX value of the
cfloop to recreate the amount (and names) of the fields in the
INSERT statement. How do I escape, or re-create the evaluated form
elements ( in which their count is #i# as the loop goes) when I
need to evaluate for #i# AND evaluate for #form.sku_i_name# at the
same pass?
I am passing, for example, #form.sku_2_Name# where that might
equal "Half Page". The number 2 in that variable was assigned
during the form creation by the current index of a cfloop. Since my
action (insert) page does not know how many (out of 50 possible)
sku's are coming, how do I use the skuCount (another hidden value
passed as well) to create a proper INSERT SQL command when I need
to eval the form element and the index at the same time?
Obviously #sku_#i#_Name# does not work, and #sku_i_Name# does
not either... I know this can be done, and that I am just doing it
wrong.
Thanks for any help!