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

Can I add free text to 'this getfield' javascript command in subject of email?

New Here ,
May 31, 2016 May 31, 2016

I am very new to Javscript and have set up a PDF form with 2 submit buttons. The 1st button is set to send an email to a Manager to give their approval for a docuemnt. I have set a 'this getfield' command to the subject line in the email but I want to add free text to the start of the subject line saying "FOR APPROVAL" then to pull from the 'title of document' field.  This is the code that I have used and it works

var cSubLine= this.getField("Title of document").value;

The person who helped me set up the javascript in the first place has now left so I am the only one doing it so please excuse my ignorance, I have not had any training but I am very keen to learn this and a very quick learner.

TOPICS
Acrobat SDK and JavaScript , Windows
491
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
LEGEND ,
May 31, 2016 May 31, 2016

Sure, just do something like:

var cSubLine = "FOR APPROVAL " + this.getField("Title of document").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
New Here ,
May 31, 2016 May 31, 2016
LATEST

That has worked so thank you! I knew it wasn't something difficult but didn't know where to start! I am trying to find a list of JavaScript commands that I can print off and have as a reference but can't seem to find them, do you know where I could find that information?

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