Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Submitting to 2 e-mail addresses

Avatar

Level 4

Hello,

Is there a way for me to have a form submitted to 2 different e-mail addresses from one e-mail button?

Thanks!

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

So the offending fields are webfirstname and secondname. If these fields are emtpy then a null will be put into its place. On those fields in the object palette click on the Value tab and there you can set a default value. Just enter in a couple of spaces.

Paul

View solution in original post

13 Replies

Avatar

Former Community Member

There are a couple of ways to handle it (it all involves code). You coudl have the two email addresses on the To line or you coudl have the email button hidden and have a visible button on the form that woudl set the address then execute the hidden email button, then update the address to the 2nd value then execute the button again.

Paul

Avatar

Level 4

I'm inclined to go with the first method of having to addresses in the "to" line.  So what do I need to do for that?

Avatar

Former Community Member

Have a look at this thread .....I created a sample that you shoudl be able to see how to do it from.

http://forums.adobe.com/message/2109208#2109208

Paul

Avatar

Level 4

Paul,

I tried reading through that thread and looking at the examples.  I've got some coding in my file now, but it's still not working and I'm not familiar enough with coding to figure out what exactly I need to do.  I'm attaching a copy of what I've got.

Thanks!

Avatar

Former Community Member

The file upload has been suspended so Iadded an image to try and get the idea across. You have to add another button of type submit. Once it is working you can set its pressence to invisible. Also you were referencing a field that did not exist (it the script that sets the subject). I added the code to use the first and last name to give you the idea.

Paul

Capture.GIF

Avatar

Level 4

It makes sense what you're telling me to do, but I when I have the buttons as Submit type I don't the ability to type in code at Button1.click.  How do I fix that?

Avatar

Former Community Member

The only button that shoudl be a submit button is the real email button (and you are right you cannot write code o

n these types of buttons). The button that is visible to the user should be a regular button. These buttons can be programmed.

Paul

Avatar

Level 4

Great.  I got a lot of this working, but now when I hit the e-mail form button it populates into 2 different e-mails.  Is there a way to have it only be in one e-mail to two people?

Thanks so much.

Avatar

Former Community Member

You can use the email address separator for your email system. In my case it is

paul.guerette@test.com;pguerett@test.com

Paul

Avatar

Level 4

Thanks.  That solved that issue.  Now the subjectl line says Faculty Employee Information Request = null null.  How do I

fix that?

Avatar

Former Community Member

It is expecting you to fill two fields and those two fields are part of the subject line ...if they are empty then they

have nulls. You coudl have an initial value of spaces in the field.

Paul

Avatar

Level 4

I'm sorry I just don't understand how to put in the spaces. Here's my scripting.  Where do I fix it?  For some reason I can't attach the file.

FacultyInformationRequestForm.FacultyForm.Button3::click - (JavaScript, client)

Button2.event__click.submit.target

= "mailto:kjensen4@unl.edu;mmesarch1@unl.edu?subject=Faculty Employee Information Request = " + webfirstname.rawValue + " " + secondname.rawValue;

Button2.execEvent("click");

Avatar

Correct answer by
Former Community Member

So the offending fields are webfirstname and secondname. If these fields are emtpy then a null will be put into its place. On those fields in the object palette click on the Value tab and there you can set a default value. Just enter in a couple of spaces.

Paul

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----