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.
Solved! Go to Solution.
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:
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
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?
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!
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!
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.
@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?
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.
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)