/t5/coldfusion-discussions/getting-data/td-p/847259Dec 02, 2008
Dec 02, 2008
Copy link to clipboard
Copied
I have a page here that add rows with 3 textbox after
pressing the button. The added textbox have all unique name. My
question is how can I access the data on the added textbox in the
next page if I don't know how many rows will be added?
/t5/coldfusion-discussions/getting-data/m-p/847260#M78158Dec 02, 2008
Dec 02, 2008
Copy link to clipboard
Copied
Your code is unreadable so I'll just tell you how I do it.
On the form page, the fields will have names like text1,
text2, etc.
On the action page, I do something like this.
<cfloop list="#form.fieldnames#" (or whatever the right
name is) index ="ThisField">
<cfif left(ThisField, 4) is "text">
<cfset ThisID = removechars(ThisField, 4)>
<cfset ThisValue = form[ThisField]>
/t5/coldfusion-discussions/getting-data/m-p/847262#M78160Dec 03, 2008
Dec 03, 2008
Copy link to clipboard
Copied
When you submit the form, there will be no array of textboxes
unless you create one. I don't see that being necessary and the
approach in my previous answer will work in your situation.
that's my javascript is doing....after you click the add
order it will add another row with three textbox.....so basically
after clicking the link it will also create an array of
textbox