I have a table that has 1 row for every day of travel. These rows are auto generated with JavaScript when the user enters Start Date and End Date. This part works fine. When the form is submitted, all but the first row are missing from the table.
What is causing the rows to disappear when the form is submitted and how do I remedy this?
I appreciate any help with this. Let me know if you need more info.
Thanks,
Eric
The below code generates the table rows.
datediff is a number field with the number of days between start date and end date
#q37 is the table add row button
$(".datediff").change(addperdiemrows); function addperdiemrows() { //Adds rows to Per Diem Table when travel dates are inputted var rownumber = $('.datediff input').val(); $('.form-del-field').trigger('click'); //Deletes all rows for (i=0; i < rownumber; i++){ $('#q37').trigger('click'); //create each new row } }