Hi all,
I've created a form through designer which is used with our Companys IT Helpdesk system. In the form I have used a regular button with a click event to submit the form through either Adobe Reader or Pro.
The filename is Company New Starter Application Form.pdf
The problem i have is that when the form is submitted, for example with Acrobat Pro the filename is changed to
Company New Starter Application Form.pdf - Adobe Acrobat Pro.pdf
This renaming of the file is subsequently causing problems with our helpdesk system where it is stripping out the PDF file likely due to the unconventional renaming of the file.
Below is the script from this click event:
if (form1.execValidate()) {
var oDoc = event.target;
xfa.host.messageBox("Thank you for completing the New Joiner form. Please check that all ADDITIONAL FORMS have been completed and submitted where requested. This submission will now be sent to IT Security. Please note, due to Outlook security precautions, you may be required to click on 'Send' when the email is generated. For your records a copy of this request will be stored in your Outlook Sent Items.", "SUBMISSION NOTICE", 3);
oDoc.mailDoc({
bUI: false,
cTo: "*********@******.co.uk",
cSubject: "Aspen New Joiner: " + Page1.firstname.rawValue + " " + Page1.lastname.rawValue + " (Starting: " + Page1.StartDate.rawValue + ")",
cMsg: "Please find attached the completed New Joiner form for " + Page1.firstname.rawValue + " " + Page1.lastname.rawValue,
});
}
else
{
SetFocusOnFirstFailedField.DoSetFocusOnFirstFailedField(form1);
}
I tried adding event.target.dirty = false; to the beginning of the script which worked as in it prevented the file from being renamed, however it subsequently stripped out all entered onto the form once submitted.
Any help would be great. Am I doing something wrong??
Thanks.