The following code will add new textbox on click event, but after When I click submit button the newly added textbox is not saving. please solve this issue.
html
<table class="form-table">
<tr valign="top">
<td id="container_width">
<input type="text" name="width" placeholder="" />
</td>
<td id="container_height">
<input type="text" name="height"placeholder="" />
</td>
<td>
<input type="button" name="increment" id="increment" value="+">
</td>
</tr>
<tr>
<td>
<input type="submit" value="Save settings"/>
</td>
</tr>
</table>
//javascript
$('#increment').click(function(){
var width = document.getElementById("container_width");
var input;
input = document.createElement("input");
input.type = "text";
input.name ="width[]";
var br = document.createElement("br");
width.appendChild(br);
width.appendChild(input);
var height = document.getElementById("container_height");
var input;
input = document.createElement("input");
input.type = "text";
input.name ="height[]";
var br = document.createElement("br");
height.appendChild(br);
height.appendChild(input);
});