Dynamically created hidden form fields
I'm not even sure this can be done, and i have wrecked my brain trying to find an answer.
I have a form, in that form I have a button "Meter" that opens up a dialog, when the dialog opens it displays a select menu that asks how many meters?...depending on what the user picks it creates that amount of text inputs, let's say they pick 2, it creates 2 text inputs, that is not a problem, i loop thru the number and create the inputs and name them meternumber0, meternumber1 and so on depending on their choice, i append the newly created hidden fields to the main form on the page that called the dialog, again not a problem there.
The problem comes in when I want to capture the information the user enters in the said text inputs and assign it to the corresponding hidden field.
Any and all help would be greatly appreciated. I have condesed the code as much as possible