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

ADOBE JAVASCRIPTS

New Here ,
Jun 18, 2018 Jun 18, 2018

Copy link to clipboard

Copied

I currently have this script running :

var patternEmpty = /^\s*$/;

var strMissing = "";

if(patternEmpty.test(this.getField("1st
purchaser").value))

     strMissing =
"1st purchaser";

  { // All is ok,
submit the data

  1. console.println("All form data ok");

  }

if(strMissing.length)

{// Got an error

  1. app.alert("Please complete 1st Purchaser: " +
    strMissing);

}

NEED this

var cToAddr =
"
Pcardreceipts@ifas.ufl.edu";

var cCCAddr =
this.getField("Email").value;

var cSubLine = " P-CARD FORM SUBMITTED FOR PROCESSING";
  1. this.mailDoc({bUI: true, cTo: cToAddr, cCc: cCCAddr,
    cSubject: cSubLine,});

I want to merge script below into the above script or should it be written as one script and if any recommendations would be appreciated....?

var cToAddr =
"
Pcardreceipts@ifas.ufl.edu";

var cCCAddr =
this.getField("Email").value;

var cSubLine = " P-CARD FORM SUBMITTED FOR PROCESSING";
var cBody = " Thank you for funding this purchase.\n" + "We Appreciate your support";
  1. this.mailDoc({bUI: true, cTo: cToAddr, cCc: cCCAddr,
    cSubject: cSubLine, cMsg: cBody});
TOPICS
Acrobat SDK and JavaScript , Windows

Views

1.7K

Translate

Translate

Report

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

correct answers 1 Correct answer

Community Expert , Jul 06, 2018 Jul 06, 2018

I'll give you a hint: JavaScript is case-sensitive...

Votes

Translate

Translate
New Here ,
Jul 06, 2018 Jul 06, 2018

Copy link to clipboard

Copied

I don't see any difference. 

Votes

Translate

Translate

Report

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 ,
Jul 06, 2018 Jul 06, 2018

Copy link to clipboard

Copied

P and p is not the same.

Votes

Translate

Translate

Report

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 ,
Jul 06, 2018 Jul 06, 2018

Copy link to clipboard

Copied

I'll give you a hint: JavaScript is case-sensitive...

Votes

Translate

Translate

Report

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 ,
Jul 06, 2018 Jul 06, 2018

Copy link to clipboard

Copied

I am beginning to figure that out as well.....  arrrrgh

Votes

Translate

Translate

Report

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 ,
Jul 06, 2018 Jul 06, 2018

Copy link to clipboard

Copied

LATEST

Thank You all that replied and for pointing out my blindness (jk) I really appreciate your assistance..... it is now working as desired.

Votes

Translate

Translate

Report

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