Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

How to send email to different person based on user selection

Avatar

Former Community Member
I have a form that needs to be submitted by email. the form needs to go to one of 35 possible office locations. i dont want to create 35 forms. is there a way to get the submit by email button to send to a certain address based on the value of a user-selectable drop-down itme. for example, send to address X if user selects City X and to address Y if user selects City Y, etc. im assuming i need some if/then statements but i dont know java nor do i fully understand the implentation of it within Designer 7's script editor. the submit button works now but there is no code in the script editor for me to tinker with. any help would be appreciated.
10 Replies

Avatar

Former Community Member
Brian,



You are thinking in the right direction. Here is an example form you can download it and take a look at the javascript to modify to your specific needs.

Avatar

Former Community Member
Brian,



You are thinking in the right direction. Here is an example form you can download it and take a look at the javascript to modify to your specific needs.

Avatar

Former Community Member
Brian,



You are thinking in the right direction. Here is an example form you can download it and take a look at the javascript to modify to your specific needs.




Click here to download the example.

Avatar

Former Community Member
excellent. thank you! but your example sends the pdf. i need just the xml data sent. 99.9% of the people filling out the form will be using reader. it looks like the mailDoc funtion sends the pdf. is there another function that sends the xml data? i tried (by guessing) mailData and mailXml but they didnt work. i tried searching for functions in the forums but didnt see anything. is there a listing of funtions somewhere?

Avatar

Level 7
No need to guess... "Designer allows you to script using the App and

Doc document JavaScript methods using the same scripting syntax used

by Acrobat".



So, you can make use of those sections (only) in the Acrobat

JavaScript Scripting Reference, part of the Acrobat SDK:

http://partners.adobe.com/public/developer/acrobat/sdk/index_doc.html

The JavaScript Scripting Guide might also be useful.



Aandi Inston

Avatar

Former Community Member
An other way is to have a few hidden buttons each of which is configured to email XML data. Based on the user's selection, you can execute the button that associate with that user selection.

Avatar

Former Community Member
thanks for the link. i found mailForm which sends an FDF file. it "works" in that it attaches an FDF file but i cant do anything with it. there is no FDF import option in acrobat. if i try to import it using all files it appears the file contains garbage and nothing is imported. im not a programmer so im pretty much at the end of my abilities on this.

Avatar

Former Community Member
that is awesome. works exactly as needed. i understand the hidden button idea now that i can see it. sorry for being dense. your help is much appreciated.

Avatar

Former Community Member
Hi,

Your link to the example doesn't work. Could you repost?

Thanks!