I am trying to dynamically add fields to my CakePHP form, but it seems that each method I used had its own downsides which I couldn\'t fix. Here is what I tried:
var optionCount = $('#poll-options > div').size() + 1;
can override your old data in scenario when cake find existing id (optionCount) in db.
if u are adding new data iteration index should be generated by uniq generator..