I know this has been asked before. There are all kinds of answers on the web and I can add a row to a table visually. Works great!! But when I query the POST the additions are not in the POST list.
My HTML markup is very simple, the action file has only 1 command when we test:
<?php print_r($_POST); ?>
<form name="receiptForm" id="receiptForm" action="printrl.php" method="post">
<button type="submit" id="saveprodsalercptbut" name="saveprodsalercptbut"><b>Save Receipt</b></button>
<table id="rcptRepeatSection" width="100%" border="0" cellpadding="3">
</table>
</form>
I get the current row using this where I have a class called item-row:
var currRow = parseInt($(".item-row").length);
var nextRow = new Number(currRow + 1);
And I throw in an alert to verify. Works great!
Then I create some markup to insert:
var markup='<tr class="item-row"><td width="70%" align="left" class="description"><input name="rcptitem'+nextRow+'" id="rcptitem'+nextRow+'" type="text" readonly="readonly" size="100" /></td></tr>';
Then I insert it using the following:
$('#rcptRepeatSection').last().append(markup);
This all works awesome! very cool!
My problem is the addition never gets added to the post when I submit!
Help??