Trying to make a form that can have rows appended when extra rows are needed and submit the form to a database with php and jquery. I can append the rows but when the form is submitted they are omitted from the response. Can someone clarify what is wrong?
code for form
<table class="material-form">
<thead>
<tr style="display: flex; flex-direction: row; justify-content: space-around;">
<th>Sku</th>
<th>Description</th>
<th>Order</th>
</tr>
</thead>
<?php
$attributes = array('name' => 'count_form');
echo form_open_multipart('request/C_request/new_material_request?wh=' . strtolower($warehouse['warehouse_name']) , $attributes);
?>
<div >
<tbody style="display: flex; flex-direction: column;">
<tr id="rows">
<td><input type="textarea" id="sku" name="sku[]" onblur="sumFunction()" style="font-size: 30px; background-color: #DCDCDC; height: 80%; margin-right: 15px" class="col-md-4" ></td>
<td><input type="textarea" id="sku" name="sku[]" onblur="sumFunction()" style="font-size: 30px; background-color: #DCDCDC; height: 80%; margin-right: 15px" class="col-md-4" ></td>
</tr>
</tbody>
</div>
</table>
<div id="add-row" >add row<p id="counter"></p></div>
<button type="button" class="btn btn-primary btn-lg" id="accept-count" style="">submit</button>
code for submit
jQuery(document).ready(function ($) {
$('#add-row').click(function() {
$('#rows').prepend('<td><input type="textarea" id="sku" name="sku[]" onblur="sumFunction()" style="font-size: 30px; background-color: #DCDCDC; height: 80%; margin-right: 15px" class="col-md-4" ></td>'
)
})
$('#accept-count').click(function () {
document.count_form.submit();
});
});