You are viewing limited content. For full access, please sign in.

Question

Question

Table Rows Disappear on Submitted form

asked on October 7, 2016 Show version history

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
    }
  }

 

 

 

Form before Submitting.png
Form after Submitting.png
Table Details.png
1 0

Answer

SELECTED ANSWER
replied on October 13, 2016

Thank you for your reply.  While gathering the requested information for you, I discovered that I had my table set to a fixed number of rows (1).  After changing it to "Append Rows to the Rows Populated..." my issue was resolved.  I love simple fixes.

Thank you for prompting me to look in the right places.

 

0 0

Replies

replied on October 7, 2016

The added rows can be submitted during my test if the table has default configuration.

Did you configure limit of rows on the table? I saw the add button is hidden in your screenshot. Can you show us your table configuration? Or any custom css and script?

1 0
SELECTED ANSWER
replied on October 13, 2016

Thank you for your reply.  While gathering the requested information for you, I discovered that I had my table set to a fixed number of rows (1).  After changing it to "Append Rows to the Rows Populated..." my issue was resolved.  I love simple fixes.

Thank you for prompting me to look in the right places.

 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.