AnsweredAssumed Answered

Insert a row in a repeating section?

Question asked by yduday on Nov 22, 2016
Latest reply on Jul 25, 2018 by tirus.brown@state.de.us

I have a form with a repeating section on it, and would like to set up the ability to insert rows in that section, rather than add them on the bottom of the section like the default behavior for the "Add new row" link. 

 

I have the repeating section configured to include an "insert row" link for each one, but can't find a function that will insert a row above (or below, doesn't really matter) the row where the "insert row" link is clicked.  I am guessing there is some sort of JavaScript function built in that looks for the last child in the repeating section, and appends the new row.  I can get the index number of the "Insert Row" link that is clicked with .index() to figure out after/before which row the new one should be added, but just need the function that creates the row to pass that parameter to.

 

sample repeating section wiht insert row link

 

Thanks for any help/guidance anyone can provide!

Outcomes