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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

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


Level 1


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


1 Reply


Level 10

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.