Skip to main content
Participant
October 4, 2023
Answered

Email subject line enhancement

  • October 4, 2023
  • 3 replies
  • 929 views

I’m using the following for a Button’s mouse down procedure, and it works fine placing the Name in the subject section preparing to send an email.

this.mailDoc({cTo: "info@testdata.org", cSubject: this.getField("Name").valueAsString});

I’d like to add text before the Name such as “Records Request Submission”

Can you help?

    This topic has been closed for replies.
    Correct answer JR Boulay

    You can place it in the script:

     

     

    this.mailDoc({cTo: "info@testdata.org", cSubject: "Records Request Submission " + this.getField("Name").valueAsString});

     

    Or place it as the default value in a (hidden) text field:

     

    var sSubject = this.getField("fieldName").valueAsString + " " + this.getField("Name").valueAsString;
    this.mailDoc({cTo: "info@testdata.org", cSubject: sSubject});

     

     

    3 replies

    JR Boulay
    Community Expert
    JR BoulayCommunity ExpertCorrect answer
    Community Expert
    October 4, 2023

    You can place it in the script:

     

     

    this.mailDoc({cTo: "info@testdata.org", cSubject: "Records Request Submission " + this.getField("Name").valueAsString});

     

    Or place it as the default value in a (hidden) text field:

     

    var sSubject = this.getField("fieldName").valueAsString + " " + this.getField("Name").valueAsString;
    this.mailDoc({cTo: "info@testdata.org", cSubject: sSubject});

     

     

    Acrobate du PDF, InDesigner et Photoshopographe
    Participant
    October 5, 2023

    That worked!

    Thank you so much for your help!

    kglad
    Community Expert
    Community Expert
    October 4, 2023

    in the future, to find the best place to post your message, use the list here, https://community.adobe.com/

    p.s. i don't think the adobe website, and forums in particular, are easy to navigate, so don't spend a lot of time searching that forum list. do your best and we'll move the post if it helps you get responses.



    <"moved from using the community">
    kglad
    Community Expert
    Community Expert
    October 4, 2023

    is this an acrobat question?

    Participant
    October 4, 2023

    Yes, Adobe Acrobat Pro