I am using Adobe Acrobat 9 Pro and enabling Acrobat Reader. The user would fill out the form and then submit as a pdf document attachment using the mailDoc method. The subject header is populated with an entry in a required text field labeled “Item Number”.
I have other required fields (for briefness I have shown script for only three) that need to be completed prior to submitting. These fields are setup as “required”, but when I added the feature of populating the subject header with the “Item Number”, the script does not recognize this. I understand this is not a feature of the mailDoc method so I am using the Array Object to ensure required fields have an entry prior to submitting. I have added (based on forum examples) the following script to a mouse up action for a submit button.
When I extend rights to Adobe Reader and click on the submit button, nothing happens. The Console Window yields “syntax error, 1:Console: Exec undefined”. Being fairly new to JavaScript I could use help on this.
Thanks in advance.
_____________________________
var RequiredFields = new Array(3);
RequiredFields[0] = "Writer'sName";
RequiredFields[1] = "SalesRepName";
RequiredFields[2] = "CustomerName";
var AlertMsg = new Array(3);
AlertMsg[0] = "Please complete one or more remaining Required Fields prior to submitting form.";
AlertMsg[1] = "Please complete one or more remaining Required Fields prior to submitting form.";
AlertMsg[2] = "Please complete one or more remaining Required Fields prior to submitting form.";
var bSuccess = True;
var emptyTest = /^\s*$/;
var fieldCount = RequiredFields.length;
var fld = 0;
for(var i= 0;i