Copy link to clipboard
Copied
There is a dropdown menu with the following values:
- "-"
- value 1
- Value 2
- Value 3
" - " is a default value and is always displayed first
(comparatively with zero)
However, a warning should appear as soon as you have not changed the value " - " to "Value 1, 2 or 3" when you save or exit the PDF. But you are not forced to change the value this is only a warning.
As a warning should appear: "Please choose a valid value (- is not a valid value)".
Thank you very much for the help!
Copy link to clipboard
Copied
Solved it myself 🙂
var f = this.getField("Dropdown1");
if (f.valueAsString=="-") {
app.alert("You must fill in this field before submitting the file.",3);
f.setFocus();
} else this.mailDoc();