Skip to main content

Why does the code below work on the first but not the second row?

 

1042i82E185A4487D8FF0.jpg

NWF$(document).ready(function() {NWF$(".BannerRequirementsClass .nf-repeater-row").each(function(index) {var BannerCodeDD = NWF$('#' + BannerCode); BannerCodeDD.change(function() {NWF$('#' + BannerQuantity).val("");NWF$('#' + BannerQuantity + " option:selected").removeAttr("selected");});});});

 

May I ask an obvious question, why are you trying to reset the dropdown? This is the default setting that when a new field or row is added, the default value will show and the user can select from there. Are you trying to force a value?


I'd like the Banner Quantity field to reset if the Banner Code selection changes. The first row works, but not the second.

Reply