I have a repeater set up that pulls information from a dataset. I have added a button to the dataset to email the contact email address in the dataset, with a specific field as the subject.
It works, but no matter which item in the repeater you click the button on, it always takes the details from the first item. I’m new to this, had a good search on here and couldn’t find an answer.
If anyone could help it would be greatly appreciated - even pointing me to another post.
Code:
import wixLocation from ‘wix-location’ ;
export function button3_click(event) {
let emailaddy= $w( “#dataset5” ).getCurrentItem().contactEmail
let opportunity = $w( “#dataset5” ).getCurrentItem().roleTitle
wixLocation.to( "mailto:" +emailaddy+ "?subject=Talent%20Opportunity%20-%20" +opportunity);
}