Copy link to clipboard
Copied
PC, Windows 10, Adobe Acrobat PRO XI
var patternEmpty = /^\s*$/;
var strMissing = "";
if(patternEmpty.test(this.getField("1st
purchaser").value))
strMissing =
"1st purchaser";
{ // All is ok,
submit the data
}
if(strMissing.length)
{// Got an error
}
this is the script currently in use and is functioning as desired. I want to add an action that when the approver hits the submit button it will cc: the email address entered in the EMAIL field completed by the originator of the form?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
I got one response to the older one however when I informed them I was on a PC and that the response was not working as the response was for a MAC the replies stopped.... So I thought rewording it with the computer info would get me a correct solution.
Copy link to clipboard
Copied
The posted code will work on Mac and PC.
Copy link to clipboard
Copied
I will try it again but I seem to recall that if an address was in the email field the validation ignored the required field and the form could be sent.... I will test once more and provide my results
Copy link to clipboard
Copied
You should continue the other thread.
Copy link to clipboard
Copied
That is what I was thinking but when I attempt to add the
var cToAddr = " Pcardreceipts@ifas.ufl.edu";
var cCCAddr = this.getField("Email").value;
var cSubLine = "P-CARD RECIEPT FORM SUBMITTED FOR PROCESSING ";
var cBody = "Thank you for submitting your form.\n" + "Save the mail attachment for your own records";
}
it doesn't like it I get an error on line 8 but there isn't anything on line 8 or I get a syntax error.
Copy link to clipboard
Copied
Remove a.
Copy link to clipboard
Copied
Ahhhh haaa.
Copy link to clipboard
Copied
ooops misread your reply
Copy link to clipboard
Copied
var patternEmpty = /^\s*$/; var strMissing = ""; if(patternEmpty.test(this.getField("1st purchaser").value))
strMissing = "1st purchaser"; { // All is ok, submit the data console.println("All form data ok");
}
if(strMissing.length)
{// Got an error
}
else
{
var cToAddr = " Pcardreceipts@ifas.ufl.edu";
var cCCAddr = this.getField("Email").value;
var cSubLine = "P-CARD RECIEPT FORM SUBMITTED FOR PROCESSING ";
var cBody = "Thank you for submitting your form.\n" + "Save the mail attachment for your own records";
}
I am pasting this into the javascript as displayed.