Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

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

Community Beginner ,
Oct 26, 2018 Oct 26, 2018

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.

TOPICS
PDF forms
4.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
1 ACCEPTED SOLUTION
Community Expert ,
Oct 26, 2018 Oct 26, 2018
LATEST

Then you can do it like this:

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

View solution in original post

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 26, 2018 Oct 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"

});

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 26, 2018 Oct 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".

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 26, 2018 Oct 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 26, 2018 Oct 26, 2018

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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 26, 2018 Oct 26, 2018
LATEST

Then you can do it like this:

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines