How to get current label button click inside a repeating section


Badge +6

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?


3 replies

Userlevel 5
Badge +14

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=48949#comment-48395 

 ‌ same row‌

Badge +6

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();
     

216946_pastedImage_1.png

calculatedSelectionCSS is the css class for the calculated value.

Badge +6

Okay, everything works fine now happy.png 

I have changed

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

to

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

Reply