Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

How to Have Same Form Sent to Contingent Email Recipients?

Avatar

Level 2
I'm trying to create a form that should go to different sets of email recipients depending on a choice selected from a drop down list menu.

I know how to create the drop-down list, but I can't figure out how to connect it to some kind of "if, then" button or command? Who knows how to solve this?
20 Replies

Avatar

Former Community Member
I have a sample that shows that ...post your email and I will send it along.

Avatar

Former Community Member
I would like to see the response to this as well. Thanks!



matthew_thompson@adp.com

Avatar

Former Community Member
I'd be happy if you'd send me also a mail with this attachment, since I am collecting some solutions already (if I get another job working with lifecycle ;D )



mailadress: diefeuerwolke@web.de

Avatar

Level 2
I'm pasting below an answer by "lkassuba" that was posted in a related forum and seems to also explain our issue:



lkassuba - 10:24am Mar 10, 09 PST (#2 of 2)



The problem is that the Form Distribution Wizard only accepts a single email address for the return data. Unfortunately this cannot be changed because the Wizard also applies Reader-enabling to the form so it can't be changed later.



As a work around you can try using the Wizard to create the collection DataSet, but not send out the form. Instead send out your original form with the multiple return addresses. Be sure to Reader Enabled the form for "Form" and "Save" rights, and make sure the submit is returning the entire PDF. When the files come back from the users you'll have to manually add them into the data collection.

Avatar

Former Community Member
Hi there again :)



I tried Pauls PDF, but I'm not able to open it without LiveCycle. (It says to be unable to find the forumlar because the XFA data reference is missing. Maybe the "#FDF" is missing. (Cannot translate that correctly since the formulation is very vague.))



Tried to copy it with LifeCycle, but didn't get that too :(

How about you? :)

Did your solutions work?

Avatar

Former Community Member
Sorry that I didn't write why I wasn't able to copy Paul's method. Just forgot it ;D



When the form is done and I click on the button, nothing happens. :(

Avatar

Former Community Member
Check the javascript console for any errors ....I assume you are able to open the form now.

Avatar

Former Community Member
WOW now it works ;D

Just tried some things out. It wasn't the script :)



For all the others, trying to accomplish the same as I do:

The "real e-mail button" has to be set a real e-mail button, not just a button. Then it works. :)

(First time I tried something with e-mail buttons ;) )



Thanx Paul :)

You are still my favorised (programmer) HERO in here :)

Avatar

Former Community Member
I would be very happy if I could get a copy of that script as well.



tluthman(at)nordicwater(dot)se



Thanks in advance

Avatar

Level 2
Paul's script is fantastic. I've just figured out how to use it. My first time ever creating a form.



However, I've still a question about how to further modify it so as to also re-program the cc, subject line, and text body. I tried to copy script I've found in other forums but it doesn't seem to work here, perhaps because its already a re-programmed conditional button.

I keep getting a message error code 4' (invalid token) in reference to the scripts email subject line. Paul, would you, or anyone on the list know, what's the issue here:



RealEmail.event__click.submit.target = mailto: + DropDownList1.rawValue?cc=testform@test.com&subject=Re: Testing New Form&body=Please%20find%20attached%20the%NewForm%21″;

RealEmail.execEvent(click);

Avatar

Former Community Member
You have errrors in your statement it shoudl look like this:



RealEmail.event__click.submit.target = mailto: + DropDownList1.rawValue + "?cc=testform@test.com&subject=Re: Testing New Form&body=Please find attached the NewForm.″;

RealEmail.execEvent(click);



Note the use of the quotation marks around the rest of the string ...that is what you were missing.

Avatar

Level 2
Thanks very much, Paul.

However, when I'm now using exactly this string, then I get an 'xml parsing error not well formed code 4 (invalid token)' for column 107, i.e. between "subject" and "=". Would you, or anyone on the forum know how to fix it?



RealEmail.event__click.submit.target = mailto: + DropDownList1.rawValue + "?cc=testform@test.com&subject=Re: Testing New Form&body=Please find attached the NewForm.″;

RealEmail.execEvent(click);

Avatar

Former Community Member
Its the quotes ..when you paste from this board into designer the quotes are represented by a different char. Delete each quote and type a new one and try it again.

Avatar

Level 2
Thanks, great point, Paul. However, the same error message still persists.

Avatar

Former Community Member
send the form to livecycle8@gmail.com and I will have a look on Monday

Avatar

Level 2
Paul, you're a genius. I've just tested it and it works wonderfully.

Cheers,

Markus



For all those who had similar issues: Consider putting an amp in when modifying subject or body for a submit button with variable addresses, such as:



= "mailto:" + DropDownList1.rawValue + "?cc=test@test.com&subject=testsubject text&body=testbody test.";



Whereas testsubject text

and

whereas testbody text.

could be any text

Avatar

Former Community Member
I have also got my form to work. ;-D)



and I was able to solve the problem with reference syntax to get my 2-page form to work. :-)



Thank you all for all help!