does it have to be separate button? couldn't you use OOTB provided 'Add new row' link?
when new repeater row is being added there are generated Before-/After-RepeaterRowAdded events for which you could write your own handler and copy value from previous row.
see
I would try this option with events!
For another button, I don't know, maybe its not necessary to add a new button.
Can some give an example? I see the JavaScript events before/ after filler. What info would go into it to trigger the copy or duplication?
Hi Mantas Šedys, were you able to resolve this?
I want to copy information from one field to another in repeating section row. What would the function be in nintex?
I am trying to use this to get the output.
function copy_data(val){ var a = document.getElementById(val.id).value document.getElementById("copy_to").value=a}
then you might want to look on these threads
Can you duplicate a repeating section in the same form?
both of them show a way how to copy value among controls in repeating section(s)
Hi Marian,
this project was side-job, so it's still necessary and i'm planning to do it in November!
Still on focus!
Marian Hatala, Alexander Hunt
I'm in progress with this task.
Now I'm using Nintex Forms - Numbering a Repeating Section - Vadim Tabakman Vadim example, just add some functionality by my needs.
I copy the first textbox in repeatingSection and add it's value to the new textbox:
In text box "Client ID JavaScript variable name" is set pirm.
Code:
var x = document.getElementByID(pirm).value;
and after if()
NWF$(repeaterRow).find('.empty').find('input').val(x);
Maybe You have ideas, how to detect last row and get textbox value from it?
Maybe with Row number?
Looking forward to hear news from You all
adding full code:
Repeating Code · GitHub
,
You are good in repeating section explanation. Could You help us?
you can read textbox control's value from last repeater row as follows.
note to use class selector instead of javascript variable.
NWF$('.vtMyRepeatingSection .nf-repeater-row:not(.nf-repeater-row-hidden):last .primClass input').val()
reg. numbering repeater rows, note Vadim's blog is from 2015.
you need not to calculate rownumber on your own anymore, there already exist currentRowNumber() runtime function.
I would try this option!
I'm stuck in SP2010, so using old methods
getting a message (with alert() ) - undinefined..
Code snippet: RepeatingRow · GitHub
Found this function!
definitely I will try it!
try to remove selectors one by one from the end to determine where it starts failing.
like
NWF$('.vtMyRepeatingSection .nf-repeater-row:not(.nf-repeater-row-hidden):last .primClass input').length
NWF$('.vtMyRepeatingSection .nf-repeater-row:not(.nf-repeater-row-hidden):last .primClass').length
NWF$('.vtMyRepeatingSection .nf-repeater-row:not(.nf-repeater-row-hidden):last').length
...
You're pro, Marian Hatala
Tested and only with the last one
NWF$('.vtMyRepeatingSection .nf-repeater-row:not(.nf-repeater-row-hidden):last').length
get result = 1;
But it should return much more.
but you have just one single last row, haven't you?
that means it can not find any any control with "primClass" "CSS class".
a typo?
can you post configuration of 'prim' text control?
Now trying with line :
alert(NWF$('.RP .nf-repeater-row:not(.nf-repeater-row-hidden):last .prim input').length);
get asnwer = 2
Optimize my code, so its much more smaller, but still get answer 1..
Answer 2 is correct.
Replace length with val() and you should get the value
Can you try with the following line :
NWF$('.RP .nf-repeater-row:not(.nf-repeater-row-hidden):last input.prim').val()