I have setup a test form here, http://www.eandhbaxendale.com/testing/ it has two list fields each with 5 columns and I have linked them so if a row is added to one it is also added to the other. This is what I am using to add the rows
$('#field_22_1 th:last,#field_22_2 th:last').html('<img src="http://www.eandhbaxendale.com/wordpress/wp-content/plugins/gravityforms/images/add.png" class="b-add" title="Add a row" alt="Add a row" style="cursor:pointer;margin:0 3px;">')
$('.b-add').click(function(){
$('#field_22_1 .add_list_item:last,#field_22_2 .add_list_item:last').click()
});
I would now like do the same with delete row, if a row is deleted from one list field the corresponding row should also be deleted from the other list field, now if I go down the same route as I have done for add row by hiding the original buttons and adding a delete row button to the table header how do I prevent it from deleting the first row when only that remains. The other option would be to leave the existing delete row buttons in place but how do I make them act on both list fields at the same time.