Using JavaScirpt to duplicate model's input text don't work
I'm working on a `CakePHP` `view` to add multiple `model` data, I would let the user choosing how many rows he wants save.

The process works if I create the rows via CakePHP view, but if I use jQuery the data isn't saved, I've checked differences between the code generate via CakePHP and the code duplicated via jQuery without see something important:

CakePHP generated form:

    <div class="location-row">
        <div class="field wrp">
            <input name="data[Location][0][name]" value="Location name" maxlength="50" type="text" id="Location0Name">
        </div>
        <div class="value wrp">
            <input name="data[Location][0][value]" value="Location value" maxlength="50" type="text" id="Location0Value">
        </div>
    </div>
    <div class="location-row">
        <div class="field wrp">
            <input name="data[Location][1][name]" value="Location name" maxlength="50" type="text" id="Location1Name">
        </div>
        <div class="value wrp">
            <input name="data[Location][1][value]" value="Location value" maxlength="50" type="text" id="Location1Value">
        </div>
        <div class="btn remove-location-row bad">delete</div>
    </div>
    <div class="location-row">
        <div class="field wrp">
            <input name="data[Location][2][name]" value="Location name" maxlength="50" type="text" id="Location2Name">
        </div>
        <div class="value wrp">
            <input name="data[Location][2][value]" value="Location value" maxlength="50" type="text" id="Location2Value">
        </div>
        <div class="btn remove-location-row bad">delete</div>
    </div>

The save process works perfect with CakePHP generated form:

    echo $this->Form->input('Comparison.0.name', array ('div' => array ('class' => 'field wrp'), 'label' => false, 'value' => $name_text));
    echo $this->Form->input('Comparison.0.value', array ('div' => array ('class' => 'value wrp'), 'label' => false, 'value' => $value_text));
    echo $this->Form->input('Comparison.1.name', array ('div' => array ('class' => 'field wrp'), 'label' => false, 'value' => $name_text));
    echo $this->Form->input('Comparison.1.value', array ('div' => array ('class' => 'value wrp'), 'label' => false, 'value' => $value_text));
    echo $this->Form->input('Comparison.2.name', array ('div' => array ('class' => 'field wrp'), 'label' => false, 'value' => $name_text));
    echo $this->Form->input('Comparison.2.value', array ('div' => array ('class' => 'value wrp'), 'label' => false, 'value' => $value_text));


jQuery duplicated rows

    <div class="location-row">
        <div class="field wrp">
            <input name="data[Location][0][name]" value="Location name" maxlength="50" type="text" id="Location0Name">
        </div>
        <div class="value wrp">
            <input name="data[Location][0][value]" value="Location value" maxlength="50" type="text" id="Location0Value">
        </div>
    </div>
    <!-- FROM HERE THE ROWS ARE DUPLICATED -->
    <div class="location-row">
        <div class="field wrp">
            <input name="data[Location][1][name]" value="Location name" maxlength="50" type="text" id="Location1Name">
        </div>
        <div class="value wrp">
            <input name="data[Location][1][value]" value="Location value" maxlength="50" type="text" id="Location1Value">
        </div>
    </div>
    <div class="location-row">
        <div class="field wrp">
            <input name="data[Location][2][name]" value="Location name" maxlength="50" type="text" id="Location2Name">
        </div>
        <div class="value wrp">
            <input name="data[Location][2][value]" value="Location value" maxlength="50" type="text" id="Location2Value">
        </div>
    </div>

Using jQuery has no effect on `CakePHP`, only the first row is saved, where I'm wrong?
Using JavaScirpt to duplicate model's input text don't work
===

I'm working on a `CakePHP` `view` to add multiple `model` data, I would let the user choosing how many rows he wants save.

The process works if I create the rows via CakePHP view, but if I use jQuery the data isn't saved, I've checked differences between the code generate via CakePHP and the code duplicated via jQuery without see something important:

CakePHP generated form:

    <div class="location-row">
        <div class="field wrp">
            <input name="data[Location][0][name]" value="Location name" maxlength="50" type="text" id="Location0Name">
        </div>
        <div class="value wrp">
            <input name="data[Location][0][value]" value="Location value" maxlength="50" type="text" id="Location0Value">
        </div>
    </div>
    <div class="location-row">
        <div class="field wrp">
            <input name="data[Location][1][name]" value="Location name" maxlength="50" type="text" id="Location1Name">
        </div>
        <div class="value wrp">
            <input name="data[Location][1][value]" value="Location value" maxlength="50" type="text" id="Location1Value">
        </div>
        <div class="btn remove-location-row bad">delete</div>
    </div>
    <div class="location-row">
        <div class="field wrp">
            <input name="data[Location][2][name]" value="Location name" maxlength="50" type="text" id="Location2Name">
        </div>
        <div class="value wrp">
            <input name="data[Location][2][value]" value="Location value" maxlength="50" type="text" id="Location2Value">
        </div>
        <div class="btn remove-location-row bad">delete</div>
    </div>

The save process works perfect with CakePHP generated form:

    echo $this->Form->input('Comparison.0.name', array ('div' => array ('class' => 'field wrp'), 'label' => false, 'value' => $name_text));
    echo $this->Form->input('Comparison.0.value', array ('div' => array ('class' => 'value wrp'), 'label' => false, 'value' => $value_text));
    echo $this->Form->input('Comparison.1.name', array ('div' => array ('class' => 'field wrp'), 'label' => false, 'value' => $name_text));
    echo $this->Form->input('Comparison.1.value', array ('div' => array ('class' => 'value wrp'), 'label' => false, 'value' => $value_text));
    echo $this->Form->input('Comparison.2.name', array ('div' => array ('class' => 'field wrp'), 'label' => false, 'value' => $name_text));
    echo $this->Form->input('Comparison.2.value', array ('div' => array ('class' => 'value wrp'), 'label' => false, 'value' => $value_text));


jQuery duplicated rows

    <div class="location-row">
        <div class="field wrp">
            <input name="data[Location][0][name]" value="Location name" maxlength="50" type="text" id="Location0Name">
        </div>
        <div class="value wrp">
            <input name="data[Location][0][value]" value="Location value" maxlength="50" type="text" id="Location0Value">
        </div>
    </div>
    <!-- FROM HERE THE ROWS ARE DUPLICATED -->
    <div class="location-row">
        <div class="field wrp">
            <input name="data[Location][1][name]" value="Location name" maxlength="50" type="text" id="Location1Name">
        </div>
        <div class="value wrp">
            <input name="data[Location][1][value]" value="Location value" maxlength="50" type="text" id="Location1Value">
        </div>
    </div>
    <div class="location-row">
        <div class="field wrp">
            <input name="data[Location][2][name]" value="Location name" maxlength="50" type="text" id="Location2Name">
        </div>
        <div class="value wrp">
            <input name="data[Location][2][value]" value="Location value" maxlength="50" type="text" id="Location2Value">
        </div>
    </div>

Using jQuery has no effect on `CakePHP`, only the first row is saved, where I'm wrong?