First let me say, I am completely new to this. My supervisor asked me to start converting word forms to PDF, and add special features, such as auto generating emails after a digital signature.
This is the script I have, copied and edited from Change subject line of email when submitting a form using Acrobat X Pro
Here is my edited script:
// Build the subject line text from several fields form fields
substart = "Request for non-standard hardware for: "
clientname = getField("name2").valueAsString;
space = " "
numsign = "##"
reqidnum = getField("reqid").valueAsString;
var subj_text = substart + clientname + space + numsign + reqidnum + numsign;
// Send the email
cMsg: "Body of email message goes here.",
So as you can tell, I'm not all that good. I had to use a variable to put a space in the subject line.
Here is how the subject line looks like with the above script:
Request for non-standard hardware for: John Smith ##123456##
How can I clean this up so I don't just keep using variables? I know theres a way I just don't know how.
You don't need the space and numsign variables, so you could instead do:
var subj_text = substart + clientname + " ##" + reqidnum + "##";
Perfect thanks! I thought I'd tried that but I kept getting errors. Guess I just put in a space wrong somewhere.