I am using Bootstrap with jQuery and I'm facing issues when passing values from FORM to PHP, in this case the same page.
My code is:
<tr>
<td><input type="text" name="descricao[]" ></td>
<td><span class="spanpreco"><input type="text" name="quantidade[]" ></span></td>
<td><span class="spanpreco"><input type="text" name="preco[]"></span></td>
<td><input type="text" name="subtotal[]" disabled></td>
</tr>
Then my jquery goes like this:
$("#adicionar").click(function(){
$("#linha").append('<tr><td><input type="text" name="descricao[]"></td><td><span class="spanpreco"><input type="text" name="quantidade[]" ></span></td><td><span class="spanpreco"><input type="text" name="preco[]"></span></td><td><input type="text" name="subtotal[]" disabled></td></tr>');
});
The problem here is when I post the data to php, every single column that I dynamically add to the form will not pass to PHP, the result number of rows is always one.
Can someone help me here?
I found the issue, the <FORM></FORM>
was on the wrong place.
Thanks and best regards,
Adelmo