Copy previous row data into new row in repeated section

  • 2 November 2017
  • 4 replies
  • 14 views

Badge +3

I have a repeating section on my form

210326_pastedImage_1.png

When i click on the 'Add new row' action the above data should be copied over to the new row as shown below.

210327_pastedImage_2.png

Does nintex forms 2013 provide this option?


4 replies

Userlevel 5
Badge +14

have a look on this -  

Badge +3

I want the data copied in the next row of the same repeating section but not another control.

Userlevel 5
Badge +14

the principle described on the link provided could be applied as well to copy row within the same repeating section. you just have to use the same selector for source and destination repeating section.

however, for one single repeating section it could be simplified to following small piece of code

(this works for single line text line which has configured CSS class 'TxtBoxClass')

NWF.FormFiller.Events.RegisterRepeaterRowAdded(function (){
      var currRow = NWF$(arguments[0][0]);
      var prevRow = currRow.prev();
     
      currRow.find('.TxtBoxClass input').val(prevRow.find('.TxtBoxClass input').val()); 
});‍‍‍‍‍‍

‌ copy row‌ duplicate row‌

Badge +3

Thanks.

Reply