I am trying to increment a form field ID so they are all different when i click on the plus to create a new row of input fields.
Here is my code so far
//Order Form
$("#add").click(function() {
$('#ordertable tbody>tr:last').clone(true).insertAfter('#ordertable tbody>tr:last');
$('#ordertable tbody>tr:last #prodcode').val('');
$('#ordertable tbody>tr:last #meterage').val('');
$('td.imgsample:last a').remove();
return false;
});
On the first line within the click function how can i change the input fields (prodcode & meterage) to be prodcode1 meterage1 e.t.c