cancel
Showing results for 
Search instead for 
Did you mean: 
hagarm
Nintex Newbie

Conditional validation on Yes/No field in Forms 2013

I have a confidentiality agreement in a yes/no field on a Nintex Form 2013.  The field is hidden unless it meets certain requirements.  I want to make it only required if it meets a certain requirement and becomes visible.  I have tried many different rules using the Required to be checked, Expression, but not having any luck.  Does anyone know if this is possible?

Thank you!

Tags (1)
0 Kudos
Reply
2 Replies
Not applicable

Re: Conditional validation on Yes/No field in Forms 2013

Add a custom validation function to your yes/no field as well as a Client ID JavaScript variable name.

Capture.PNG

Then in Custom JavaScript, add a function like this:

function validateYesNo(source, arguments){

    arguments.IsValid = true;

    if(NWF$('#' + yesno).is(':visible') && !NWF$('#' + yesno).prop('checked'))

       arguments.IsValid = false;

}

0 Kudos
Reply
hagarm
Nintex Newbie

Re: Conditional validation on Yes/No field in Forms 2013

Thank you so much Jeff!  Worked like a charm!

Reply