How to get a Yes/No checkbox that toggles when a People control changes its value.
+8
So any time the people control changes you want the yes/no field to flips its value?
+2
+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.
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
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.