AnsweredAssumed Answered

How to loop through option buttons using Javascript in Nintex Form

Question asked by wwzdream on May 19, 2016
Latest reply on May 23, 2016 by patrickabel

I have a form with 100 option buttons with Yes, No and N/A choice. I gave the buttons name such as B1, B2, B3... When the user clicks a Select All Yes or Select All No button, the button will call java script which will make either Yes or No option of all 100 choice checked. Currently I can do it with one at a time NWF$('#'+B1).find('input[value=\'Yes\']').attr('checked', 'checked'); However when I try to put it into a loop then it does not work any more.
for (var i = 1; i <= 100; i++ )
NWF$('#'+B+'i').find('input[value=\'Yes\']').attr('checked', 'checked');

Any help is greatly appreciated!