Updating a checkbox in a checkbox group on a nintex form using NWF$

  • 28 July 2014
  • 3 replies
  • 11 views

Badge +1

I currently successfully use the following statement in JavaScript to update a radio button on a Nintex form:

NWF$('#'+jsvRadioButtonField).find('input[value='Radio Choice 2']').attr('checked', 'checked');

What is the equivalent for updating a checkbox in a checkbox group on a Nintex form?


3 replies

Badge +3

I haven't delved into this, but on a quick glance, have you tried using true or false, instead of checked?

For instance:

NWF$('#'+jsvRadioButtonField).find('input[value='Radio Choice 2']').attr('checked', 'true');

or

NWF$('#'+jsvRadioButtonField).find('input[value='Radio Choice 2']').attr('checked', 'false');

Badge +1

Radio buttons work fine. The following all work with radio buttons.

NWF$('#'+jsvRadioButtonField).find('input[value='Radio Choice 2']').attr('checked', ‘true’);

NWF$('#'+jsvRadioButtonField).find('input[value='Radio Choice 2']').attr('checked', true);

NWF$('#'+jsvRadioButtonField).find('input[value='Radio Choice 2']').attr('checked', ‘checked’);

The issue is with checkboxes. I have tried the following on a checkbox group and none of them work.

NWF$('#'+jsvCheckboxField).find('input[value='Checkbox Choice 2']').attr('checked', 'true');

NWF$('#'+jsvCheckboxField).find('input[value='Checkbox Choice 2']').attr('checked', true);

NWF$('#'+jsvCheckboxField).find('input[value='Checkbox Choice 2']').attr('checked', 'checked');

Badge +2

Hi there,

Do you know how to get the value from a radio button group using JavaScript on Nintex form?

Thanks

Reply