Reset checkbox.


Badge +6

Good Day Team,

I am trying to evaluate some conditions in my approval Task "Approved/Rejected" If the task is rejected then I need select an extra reason " Terminate Workflow, Request Information, Escalate", however if the user has selected rejected and after that he decide change to Approved I need reset the choices or extra reasons whatever that was.
To reset the fields I have used the following code but it is not working, any suggestion will be great.  I am using nintex on premise 

214124_pastedImage_2.png

NWF$(document).ready(function () {
NWF$("#" + varabc).change(function () {
if(!NWF$(this).prop('Rejected'))
NWF$("#" + varbcd).attr('checked', false);
});
});


2 replies

Userlevel 5
Badge +14

Something along these lines should work:

NWF$(document).ready(function() {
  NWF$("#" + varabc).change(function() {
    if (NWF$("#" + varabc).find("input:checked").siblings("label").text() === "Approved") {
      NWF$("#" + varbcd).find("input:checked").prop("checked", false);
    }
  });
});

Does this solve the problem? 

Badge +3

I don't have the code in front of me right now, but I did something similar with a checkbox.  I think you want to set the value of varbcd to null.  Something like:

NWF$("#" + varbcd).val('');

Reply