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

Validate Attachments when a specific question is answered

Jump to solution

So I'm trying to require attachments when a specific question is asked.  So I followed Nick Hurst's article on how to do this.  Nintex Forms conditionally require attachments – SharePoint and Nintex OOTB.  So I have to alter it a bit as what selection I'm using is a tad different than what he uses.  I have the following drop down control set like his parameters require

I here is what I have in for my JS

function validateAttachments(source, arguments)
{
var elm = NWF$(‘.nf-attachmentsTable’);
var requesttypeValue = NWF$(‘#’ + RequestTypeClientID).val();
arguments.IsValid = true;if (requesttypeValue == ‘Please send a purchase order along with my registration. Request must be submitted at least four weeks in advance.’) {
if (elm.length > 0 && elm.find(‘tr’).length >= 1) {
arguments.IsValid = true;
} else {
arguments.IsValid = false;
}}}

I had some parenthesizes in my statement that I thought could be the culprit, but removing those did not work.  Hopefully someone sees what I'm messing up that I cannot see.  I'm horrible when it comes to JS so 99.9% I have no clue on what to troubleshoot when I have JS issues.  Any help here would be great. Thanks 

0 Kudos
Reply
2 Replies
brianknight
Nintex Newbie

Re: Validate Attachments when a specific question is answered

Jump to solution

Actually I found this thread  which solved my issue.  Specifically espradli@quiktrip.com;s section.  This worked exactly as I needed it.  

View solution in original post

Reply
espradli
Nintex Newbie

Re: Validate Attachments when a specific question is answered

Jump to solution

Happy to help. This community site has helped me a lot, so it is nice to know I have helped someone.

0 Kudos
Reply