Being new at JS still, I may have mis spoke. I am trying to learn ad do stuff on my own, but holy JS is not easy.
I need a script that will check 2 dropdowns to make sure a choice was made. There is a default of 'click for more options'.
So my script checks to see if click for more options was chosen, if so it generates an error message......but then still emails the form.
I need to get the email submit in the script, not sure how.
This is what I have. I tried using and AND/OR but it did not work.
if (this.getField("typeofestablishment").valueAsString=="click for more options") {
app.alert("Please select a valid Choice Number 5");
}
else if (this.getField("typeoflossortheft").valueAsString=="click for more options") {
app.alert("Please select a valid Choice Number 6");
}
Use this:
if (this.getField("typeofestablishment").valueAsString=="click for more options") {
app.alert("Please select a valid Choice Number 5");
} else if (this.getField("typeoflossortheft").valueAsString=="click for more options") {
app.alert("Please select a valid Choice Number 6");
} else this.mailDoc({cTo: "me@server.com"});