How do I search a text field for multiple words?
I have a fillable PDF and in one of the fields I need an alert to appear if one of many words is not used. I have found the below script, but I'm struggling to get it to work for more than just one word. Does anybody know how I can make this work with a list of words?
var n = event.value.indexOf("leadership");
if (n == -1) { // substring not found
app.alert("Does not contain one of DOR’s Core Values.");
event.rc = false;
}
else {
event.rc = true;
}
