I have added a field for email addresses in a database for contact cards. Is there any way to link those emails to an icon/button in a repeater so that when each individual’s icon/button is clicked it opens their specific email in an email client?
Hi Shannon!
You might want to check out this answer .
It explains how to set up a click handler for a button/icon in a way that the handler has access to the data of the repeater item the clicked button belongs to.
In your particular case, you should also use wix-location module to open the email client like that:
import wixLocation from 'wix-location';
// inside the onClick handler
wixLocation.to("mailto:a@b.com?subject=Something%20Intersting");
Let me know if you face any issues along the way.
Good luck!
Vytautas