How to stop email client when requirement isn't filled
I use a javascript on a button to create an email when pdf formular is filled.
to check if a digital sign is given I use:
var dSign = this.getField('FKDigSig').value;
if (dSign.value == "") {
app.alert("Please check if you have digital signed the form!");
}
var email = 'a.b@domain.com';
var ccmail = this.getField('FK-Mail').value;
var subjectline = 'requested pdf';
var body = 'Hello,\n\nattached you'll find the filled form\n\nGreetings!\n';
this.mailDoc(false, email, ccmail, "", subjectline, body );
But if the digital sign is not filled, the alert comes up and if I enter it by ok, then the email client starts with all details and attached file.
I need to have a break here!
So if I enter the js-alert by clicking the Okay-button, the email client shouldn't start. The PDF should stay open to get fullfilled till the dSign-Field got a value by a digital signing.
How to realize this?
Thanks&Greetings from Berlin,
Wollehaufen
