In that case, the Canceled field if of Choice Type and the first script shared by me should work.
Also, can you share (screenshot) the field setting and Rule applied to Canceled field? If no rule is applied can you check if the SharePoint List Column is marked for mandatory?
Below is working code, and should work for a Yes/No field and Choice field types:
NWF$(document).ready(function () {
//for Yes/No field type
var opt= NWF$("#" + chkCancelled);
opt.change(function(){
if(opt.prop('checked'))
alert("Custom message");
});
//for Choice field type
var opt1= NWF$("#" + ddlOption);
opt1.change(function(){
if(opt1.find('input:checked').val() == "Yes")
alert("Custom message 1");
});
});
Hi Chaitra,
Again sorry for taking up your time. Here are the screenshots
Paste this script in the Custom JavaScript and test:
NWF$(document).ready(function () {
//for Choice field type
var opt= NWF$("#" + chkCancelled);
opt.change(function(){
if(opt.find('input:checked').val() == "Yes")
alert("Custom message");
});
});
Please do share the outcome.
Also, confirm of no rule applied on this control in Nintex Form.
Thanks Chaitra for you patience and time!