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




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  = ""

value of "A320" item = ""

value of "b737" item = ""

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.




   // 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


Accepted Solutions (0)

Answers (1)

Answers (1)




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.