AnsweredAssumed Answered

Validate Attachments when a specific question is answered

Question asked by brianknight on Apr 2, 2018
Latest reply on Apr 4, 2018 by

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