AnsweredAssumed Answered

Adding a change event, to a list lookup, in a repeat section

Question asked by tplant on Feb 6, 2018
Latest reply on Feb 7, 2018 by tplant

Hi,

 

I am trying to add a change event, to a list lookup, in a repeat section, using JavaScript.

 

Currently I am adding the event handler in the RegisterRepeaterRowAdded function. But the change event only fires when a new row is added. I would like the event to fire any time the user changes the lookup.

 

 

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

   var currRow = NWF$(arguments[0][0]);

   currRow.find('.cable-lookup select').change(

      repeatCableChanged(currRow.find('.cable-lookup select'))

   );

});

function repeatCableChanged(cableLookup) { alert(cableLookup.val()); }

Outcomes