I have the following line :
html += '<td><select value="<?php echo $location; ?>" class="form-control" name="data[InvoiceDetail]['+i+'][location]" id="location_'+i+'" placeholder="Location"></td>';
That is a part of a function that adds multiple dynamically added table data and rows. I have other entries that do not mess up the script, such as :
html += '<input type="hidden" id="stock_'+i+'"/>';
I think the problem of the script not working is the ";" after $location, but I do not know how to alter the script to allow this?
So, boiling everything down, how do I add the above line to the dynamically added rows, while retaining the values?
Thanks!