cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

How to get current label button click inside a repeating section

Jump to solution

Good day!

I have a question regarding how to get the current row.

I saw a post doing this:

NWF$(".nf-outer").on("blur",".my-dropdown",function()

{

  var $row = NWF$(this).parents(".nf-repeater-row").first();

  var dropdown = $row.find(".my-dropdown");

  var texbox= $row.find(".my-textbox");

  ...

});‍‍‍‍‍‍‍‍‍‍‍‍‍

However, it seems to work only on a control outside the repeating section and it is a drop-down control.

What I am doing right now is to use a label as a button inside a repeating section. So how to get the current row onclick?

Labels: (2)
0 Kudos
Reply
3 Replies
Workflow Hero

Re: How to get current label button click inside a repeating section

Jump to solution

use a script like this

NWF.FormFiller.Events.RegisterAfterReady(function () {
   NWF$('.LabelCSS').click(function(){
      var row = NWF$(this).closest('.nf-repeater-row');
      row.find('.my-textbox input').val('xxxx');
   });
});
‍‍‍‍‍‍

you might want to look on this thread as well

https://community.nintex.com/message/48949-re-formatting-repeating-section-of-the-form?commentID=489... 

 ‌ same row‌

Reply
Workflow Hero

Re: How to get current label button click inside a repeating section

Jump to solution

For some reasons, it does not seem to work. 

NWF.FormFiller.Events.RegisterAfterReady(function ()
{
     
   NWF$(".addItemLabelButton").click(function()
   {
     let row = NWF$(this).closest('.nf-repeater-row');
        let selectedItems = row.find('.calculatedSelectionCSS textarea').val();
     

calculatedSelectionCSS is the css class for the calculated value.

0 Kudos
Reply
Workflow Hero

Re: How to get current label button click inside a repeating section

Jump to solution

Okay, everything works fine now  

I have changed

row.find('.calculatedSelectionCSS textarea').val(); 

to

row.find('.calculatedSelectionCSS label').text()
Reply