Nintex form

  • 3 January 2018
  • 4 replies
  • 3 views

Badge +2

How to get  a Yes/No checkbox that toggles when a People control changes its value.


4 replies

Badge +8

So any time the people control changes you want the yes/no field to flips its value?

Badge +2

yes

Badge +7

Hi Anjali,

I'm not sure if you can do this with a rule on the form. I will do this with a workflow but this means update only after you saved the form.  

The workflow will kick off with a start when modified expression comparing current value for person control with previous value for person control.  If it changed, update the value to yes (if it was no) or no (if it was yes).

Let me know if you need more information.

Userlevel 5
Badge +14

following code should toggle yes/no control value within form based on people picker change

function toggleYesNo(){
    NWF$('#' + jsvarYesNo).prop('checked',!NWF$('#' + jsvarYesNo).prop('checked'));
}


NWF.FormFiller.Events.RegisterAfterReady(function (){
   var PPObj = new NF.PeoplePickerApi('#' + jsvarPP);
   PPObj.added(toggleYesNo);
   PPObj.removed(toggleYesNo);
});

‍‍‍‍‍‍‍‍‍‍‍‍

Reply