Select to view content in your preferred language

Email Links in Experience Builder?

9369
24
Jump to solution
08-05-2020 08:38 AM
by Anonymous User
Not applicable

How can I set email links in buttons/text? I try using mailto:somebody@company.com?subject=Hello as a Web Address. When i click on the button/link, nothing happens.

0 Kudos
1 Solution

Accepted Solutions
TonghuiMing
Esri Regular Contributor

Starting from AGOL 10.3, you can configure mailto and some other URI schemes directly in the 'Set Link > URL' for widgets like Button, Image, etc. See details in:

https://doc.arcgis.com/en/experience-builder/latest/build-apps/add-widgets.htm#ESRI_SECTION1_0F7788F...

View solution in original post

0 Kudos
24 Replies
DavidMartinez
Esri Regular Contributor

Hi Nikholai,

Currently, the only way to add this is via the embed widget via code. For example, <a href="mailto:somebody@company.com ">Send email</a>. I will log an issue for us to look at how we can support this in other widgets. 

Thanks,

David

AmyOdom
Occasional Contributor

Is there a way to link the code to the data being used in Experience Builder? For example, I have an attribute field {email} populated by several different groups (data coming from Survey123). I want to create a link/button for interested parties to click to "contact us". When I input the code above, it opens my default email application, but the name obviously is not populated with the email from that attribute. Is this possible? 

by Anonymous User
Not applicable

I have a related question @DavidMartinez which at this point is more of an html question than ExB BUT how can I modify the color, font, and alignment (from left to center) of the text? I know no html and am having a hard time modifying your code to meet my needs.

Thanks!

0 Kudos
MeghanJones
Occasional Contributor

Hi David, 

Could you please assist why my mailto code is not working? In Experience Builder, I added the embed widget and in the Content > Embed by > Code window I wrote this: 

<ahref="mailto:mjones@ljbinc.com?cc=mbell@ljbinc.com&subject=Amazon%20Fall%20Protection%20Site%20Technical%20Assistance%20Needed&body=Hello%20-%0D%0A%0D%0APlease%20provide%20assistance%20with%3A ">Need Help? Contact us for Technical Support</a>

When saved and published, the embed link does not work. Is there something wrong with my code? Thank you in advance!

0 Kudos
JonathanMcDougall
Frequent Contributor

@MeghanJones 

Best bet would be to take your html and run it through an HTML code checker or compiler - something like w3 schools - or mailtolink.me 

For anyone else looking for the "button" experience, I can't remember if I included this in my response to a similar question a couple of weeks back, giving embed as the solution, simply make a card, shape it, outline it, then put in the embed widget. You can set the on hover for the card too.... so a fake button. Or just create an html button with the email code too.

AmyOdom
Occasional Contributor
Is it possible include an attribute field in the code that would fill in the email address dynamically? I have a case where multiple users will be inputting their contact information (email) into a survey123 and that data is the field I want to include in the email code for the “fake button”. Thanks for any assistance you can provide.
David_Brooks
MVP Regular Contributor

@DavidMartinez , I'm just starting with custom embed code, and am struggling to work out how to get a mailto embed to work within a Card (which im using in absence of this functionality on a button).

So if I drop the embed code widget into the Card container, with the following code:

 

 

<a href=mailto:"XDAOO@orsted.com, JOHLE@orsted.com?subject=HOW04%20-%20WindGIS%20Feedback"></a>

 

 

...how do i get this code to run when I click on the Card? or is this not possible?

@JonathanMcDougall i think this question is also for you, as im following your advice above.

@Jianxia is this something you might be able to help with?


David
..Maps with no limits..
0 Kudos
SallyCox1
New Contributor

I discovered the fix purely by accident.  If you type the email address in a Word document and hit return, Word automatically hyperlinks the address with the "mailto" link. Copy that linked email and paste it directly into your Experience content and it retains the mailto link.

Nicauldron
Occasional Contributor

Thanks for this fix! 
However when I paste the link from Word, still nothing happens when I click on it. 
How do I make the link open the email app? (Outlook in this case)

0 Kudos