Creating a submit button that will rename, flatten, hide button, save a copy, and email new file.
I am setting up a fillable form using Acrobat DC. It is intended to be a quick and easy way of creating invoices to customers.
There are fields for FirstName, LastName, Address1, Address2, PostCode, TelephoneNumber, Email, InvoiceNumber, ItemDescription, ItemCost, Total.
I have created a submit button for the form. When I click it, it currently opens my mail client, fills the Subject field with a specified text, creates body text, including taking the recipient's first name from the form as a greeting, then sends a copy of the pdf to my email address, and to the recipient's email address, again, taken from a field on the form.
That's all working well. I want it to do more though.
This is the workflow I would like:
Click Submit > OnMouseUp > Hide the submit button > Flatten the entire file so that it is no longer editable, Create a new PDF file from the original pdf, naming it with input from the InvoiceNumber field on the original > Save the new file to the same folder as the original (with its new name) > email the flattened and renamed file to a specified email address, as well as to the email address taken from the original form, and populate the subject and body of the email based on strings and field forms > Then finally to restore the original to editable status, and Unhide the Submit button, ready to use again.
I realise this is asking a lot on one click, but is there a way to achieve all this using javascript?
(Please bear in mind I am not a coder, and will need talking to as if I know nothing. Assuming zero knowledge won’t be far off he mark!)
Thanks so much for any help you can provide.
Nathan
