Skip to main content
petrost74681737
Participant
October 26, 2018
Répondu

Submit button to add file name and PDF's file and in the subject line...

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.

Ce sujet a été fermé aux réponses.
Meilleure réponse par try67

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?


Then you can do it like this:

cSubject: this.documentFileName + " from " + this.getField("Text4").valueAsString,

1 commentaire

try67
Community Expert
Community Expert
October 26, 2018

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"

});

petrost74681737
Participant
October 26, 2018

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".

try67
Community Expert
Community Expert
October 26, 2018

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.