Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

how to make change the value of the item in the dropdown list if some text field is not empty

Avatar

Avatar
Level 1
almasriaa544286
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile

Avatar
Level 1
almasriaa544286
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile
almasriaa544286
Level 1

20-10-2019

hello

i have a digital flight report, and it has button to submit by email (this.mailDoc),

the email is selected based on the aircraft type dropdown list

Drop down list "A/C TYPE"

value of "A330" item  = "a330vr@almasriaairlines.org"

value of "A320" item = "a320vr@almasriaairlines.org"

value of "b737" item = "b737vr@almasriaairlines.org"

i want to add the chief pilot email if field "comments" is not empty

the script is:

//

// Before sending the data, make sure that all required

// fields are valid

//

//  The "Ex2ValidFields" fucntion is located in the document script

//  If you copy this button action then you will also need to delete

//  this first if statement or copy the "Ex2ValidFields()"

//  fucntion and modify it to work with your form.

//

if(Ex2ValidFields())

{

   // This is the form return email, It’s hardcoded

   // so that the form is always returned to the same address

   // Change address on your form

   var cToAddr = this.getField("A/C TYPE").value;

   // First, get the client CC email address

   var cCCAddr ="";

    // Now get the beneficiary email only if it is filled out

   // Set the subject line for the email message

var cSubLine = this.getField("FLIGHT NORow1").value +" / "+ this.getField("A/C REG").value +" / "+ this.getField("FROM1").value +"-"+ this.getField("TO1").value +"-"+ this.getField("TO2").value +"-"+ this.getField("TO3").value + " VOYAGE REPORT";

   //  Set the body text for the email message

var cBody = "Thank you for submitting your report.";

   // Send the entire PDF as a file attachment on an e-mail

   this.mailDoc({bUI: true, cTo: cToAddr, cCc: cCCAddr,

                  cSubject: cSubLine, cMsg: cBody});

}

thank you in advance

abdalla

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar
Boost 50
MVP
_Bruce_Robertson
MVP

Likes

270 likes

Total Posts

1,782 posts

Correct Reply

372 solutions
Top badges earned
Boost 50
Boost 5
Boost 3
Boost 250
Boost 25
View profile

Avatar
Boost 50
MVP
_Bruce_Robertson
MVP

Likes

270 likes

Total Posts

1,782 posts

Correct Reply

372 solutions
Top badges earned
Boost 50
Boost 5
Boost 3
Boost 250
Boost 25
View profile
_Bruce_Robertson
MVP

20-10-2019

Hi Abdalla,

Is this a PDF form developed with LiveCycle Designer (a XFA form) or Adobe Acrobat (a AcroForm).  This forum is for XFA Forms.

Regards

Bruce