I would also like to final email to be a standard PDF not a form. Is this possible and if so what is the script.
I currently have the following:
var cToAddr = "email@example.com";
var cCCAddr = "firstname.lastname@example.org";
var cBody = "Thank you for submitting your form.\n" + "Please retain this mail attachment for your own records";
var cSubLine = "Production Instructions ";
This works great but now I would like to improve it further?
Do you want to get the value of a form field and use it in a parameter of the mailDoc method? If so, you could do something like:
var sText = getField("text1").valueAsString;
var cBody = sText + " other test goes here.";
You can't flatten a form - which converts the field appearances to regular page contents - with Reader, but you can set the fields to read-only:
getField("text1").readonly = true;
Thanks George This works perfectly.
I have now added a print and send button to my form that Prints to the default printer, makes all fields read only and then sends the mail.
My final question is can I set a close without saving option to this as I want the form to be used over and over again?
If I just close the document when I open it again all fields are read only (as expected)