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

Multiple Email Submissions for Form

New Here ,
Aug 27, 2021 Aug 27, 2021

Happy Friday!

I'm creating a form using Adobe Acrobat Pro DC (32-bit) and am struggling with the following:

Creating a method in which there are five possible emails the form can be submitted to. Each email respresents a division within my department.

I would like users of the form to be able to select any number of emails to send the form to, from one division to all.

Is there javascript I can use to make this happen? I'm well aware of how to use the submit form button + mailto:adobe@adobe.com but what about multiple selections?

 

Thank you so much 🙂

TOPICS
Create PDFs , JavaScript , PDF forms
338
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
Community Expert ,
Aug 27, 2021 Aug 27, 2021
LATEST

Create 5 check-boxes, one for each department, and set the email address as their export values. Say they are called Dept1 to Dept5.

Then you can use the following script to submit the form to the selected departments:

 

var emails = [];
for (var i=1; i<=5; i++) {
	var v = this.getField("Dept"+i).valueAsString;
	if (v!="Off") emails.push(v);
}
if (emails.length==0) app.alert("You must select at least one department.");
else this.mailDoc({cTo: emails.join(";"), cSubject: "Email subject goes here", cMsg: "Email message goes here"})
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