I have a form that needs to be dynamic, allowing the user to add extra outcomes, w/ however many measures they need associated with it, as depicted here: https://i.sstatic.net/EMcoa.png
Here is a sketch of the naming scheme: http://i55.tinypic.com/2s6rh4y.png

Below is the code in some form of working order: http://jsfiddle.net/bkmorse/yNZcD/2/
What I am having a problem with is making the name of the outcome and measure fields correct.
I need the first outcome textarea to be named: outcome[1]. amd every extra outcome textarea should be outcome[2], outcome[3] and so on.
As for the measure textareas, I need them be named like this: measure[1][0], measure[1][1], measure[1][2] and so on.
The measure textarea's are named like that, because they will be ran thru a loop when inserted into the database, and the first index number will relate to the outcome.
So when the user adds more measure textareas, the index should increase, for example...
outcome[2], has measure textarea: measure[2][0], measure[2][1], then when they click the plug sign, it will create a new measure textarea, named measure[2][2].
Same thing goes for when clicking the plus sign next to outcome, so the next outcome textarea name would be outcome[2], click for another outcome it would be outcome[3] and so on.
The code works, but I just need to have someone look at it and revise it so it has the name scheme I want.
I need them be named like this: measure1[0], measure1, measure1[2] and so onDid you mean:I need them be named like this: measure1[0], measure1[1], measure1[2] and so on?