AnsweredAssumed Answered

How to set value of Yes/No control via JQuery

Question asked by janp on May 12, 2017
Latest reply on May 18, 2017 by cmykkid

I'd like to set the value of a yes/no control on a Nintex form using JQuery and for some reason I'm not able to get the result.

To evaluate the result, I'm using the Nintex rules. (Also tried this with a lookup calculated value control with the same results)

 

Let's say that the yes/no control is called Draft. The validation rule would then be:

 

Draft

(given that this is a yes/no control, this evaluates to true/false and nothing else is necessary)

 

After giving the control the javascript id Draft I've tried:

 

NWF$("#"+Draft).val("Yes");

(and variations of yes - "Yes","yes","True","true","1",1

 

I've also tried setting the prop and attr

 

NWF$("#"+Draft).prop("checked",true); and NWF$("#"+Draft).attr("checked",true);

 

While visually, the prop "checked" the checkbox, it didn't impact the validation rule.

 

So my question is, how to set the value of a yes/no control that that the nintex validation rule recognizes the value correctly?

 

Thanks,

Outcomes