cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
furstlars
Nintex Newbie

How Do I Incorporate a Dropdown .change function() in the RegisterRepeaterRowDeleted function() ?

Can anyone assist with the following syntax so that after a repeating row is deleted, the dropdown change function continues to work? Highlighted for emphasis:

 

NWF.FormFiller.Events.RegisterAfterReady(function () {

NWF$(".nf-repeater-addrow").hide();
var BannerQuantityDDL = NWF$('#' + BannerQuantity);

BannerQuantityDDL.change(function () {

var BannerQuantityDDLVal = NWF$('#' + BannerQuantity).val();

   if (BannerQuantityDDLVal == "1") {
   NWF$(".nf-repeater-addrow").show();
   }

else {
   
   if (BannerQuantityDDLVal == "" || BannerQuantityDDLVal == "2") {
   NWF$(".nf-repeater-addrow").hide();
}};
});
});

NWF.FormFiller.Events.RegisterRepeaterRowDeleted (function () {

NWF$(".BannerRequirementsRepeater .nf-repeater-row:not('.nf-repeater-row-hidden')").each(function() {

var BannerQuantityCurrentVal = NWF$(this).find(".BannerQuantityClass select option:selected").val();

 if (BannerQuantityCurrentVal == "1") {
   NWF$(".nf-repeater-addrow").show();
}

else {

 if (BannerQuantityCurrentVal == "" || BannerQuantityCurrentVal == "2") {
   NWF$(".nf-repeater-addrow").hide();
}};
});
});

 

Labels: (1)
Tags (2)
0 Kudos
Reply
1 Reply
ShaneOp
Nintex Newbie

Re: How Do I Incorporate a Dropdown .change function() in the RegisterRepeaterRowDeleted function()


@furstlars wrote:

Can anyone assist with the following syntax so that after a repeating row is deleted, the dropdown change function continues to work? Highlighted for emphasis:

 

NWF.FormFiller.Events.RegisterAfterReady(function () {

NWF$(".nf-repeater-addrow").hide();
var BannerQuantityDDL = NWF$('#' + BannerQuantity);

BannerQuantityDDL.change(function () {

var BannerQuantityDDLVal = NWF$('#' + BannerQuantity).val();

   if (BannerQuantityDDLVal == "1") {
   NWF$(".nf-repeater-addrow").show();
   }

else {
   
   if (BannerQuantityDDLVal == "" || BannerQuantityDDLVal == "2") {
   NWF$(".nf-repeater-addrow").hide();
}};
});
});

NWF.FormFiller.Events.RegisterRepeaterRowDeleted (function () {

NWF$(".BannerRequirementsRepeater .nf-repeater-row:not('.nf-repeater-row-hidden')").each(function() {

var BannerQuantityCurrentVal = NWF$(this).find(".BannerQuantityClass select option:selected").val();

 if (BannerQuantityCurrentVal == "1") {
   NWF$(".nf-repeater-addrow").show();
}

else {

 if (BannerQuantityCurrentVal == "" || BannerQuantityCurrentVal == "2") {
   NWF$(".nf-repeater-addrow").hide();
}};
});
});

 


I also need help with the same. Help is appreciated.

Thanks in advance,
Regards,

Shane

0 Kudos
Reply