This is my script (using Acrobat Professional 9.2)
-------------------------------
If (this.getField("bene1_name").value==null)
{
app.alert("You have not entered a name for the beneficiary in Section 10. Please note, Section 10 is required. Be sure to fill in the beneficiary information before you submit the application. If you have questions, please call xxx-xxxx.", 3, 0, "Form Completion Instructions");
}
------------------------------------
I have added that script to the print button but nothing happens when I click the button. Not sure what I did wrong - is it the value?
Make sure you are spelling and capitalizing everything properly.
Are you sure a null string is the same as null?
Try the following script:
console.clear();
console.println('null == "": ' + (null === ""))
try {
If (this.getField("bene1_name").value == "")
{
app.alert("You have not entered a name for the beneficiary in Section 10. Please note, Section 10 is required. Be sure to fill in the beneficiary information before you submit the application. If you have questions, please call xxx-xxxx.", 3, 0, "Form Completion Instructions");
}
} catch(e) { console.println(e.toString()); }
George Kaiser