Copy link to clipboard
Copied
Hello All
I have a PDF form with a submit button. When clicked the submit button, it attaches the form to an email and the user can send the PDF to me. However I need to make some changes such as, when the user click the submit button,
1, the users email address populated
2, Subject: displays, which is the PDF's file name, is populated.
I need help with the second function. I want the submit button to add the user's name and the PDF file name under the email the "subject line".
Thank you All.
Copy link to clipboard
Copied
Then you can do it like this:
cSubject: this.documentFileName + " from " + this.getField("Text4").valueAsString,
Copy link to clipboard
Copied
You need to use a script for that.
The basic format would be:
this.mailDoc({
cTo: "your_email_address@server.com",
cSubject: this.documentFileName,
cMsg: "Enter the email message body here"
});
Copy link to clipboard
Copied
Thank you for quick response,
It is not adding the name to the subject line with the file name. However, I forgot to mention the form has a text box for entering the user's name. The text box name is,"Text4".
Copy link to clipboard
Copied
I don't understand what you want to do with that text field.
If it's not working check the JS Console (Ctrl+J) for error messages after clicking the Submit button.
Of course, you'll need to place the code above under a "Run a JavaScript" action associated with the button's MouseUp event.
Copy link to clipboard
Copied
Sorry for the confusion.
Yes, I am working on the Js Console. What I want the text field name is when I received the email from the customer, I want the subject line populated by both the file name and user's name together. is that clear?
Copy link to clipboard
Copied
Then you can do it like this:
cSubject: this.documentFileName + " from " + this.getField("Text4").valueAsString,

