Hi Guys
I am new to using Javascript with Nintex for SP2013 and I was wondering if someone could help me out with this. Lets say I have a multi line textbox called 'projsumm' and I want to restrict the number of words to be put into this entry to 250 words. I had found this code on a previous thread and was wondering if i could use it in some way although I am unsure as to how to reference the actual textbox 'projsumm' in this particular case.
function wordCount(source, args) {
var words = args.Value.split(” “);
words = NWF$.grep(words, function (element, index) {
if (element.trim() != “”) {
return true;
}
});
if (words.length < 20)
{
args.IsValid = false;
}
}
Any help would be greatly appreciated or providing alternative methods of how to achieve what I am after.
Cheers,