Hi there,
I’m trying to populate data collection into a repeater. Everything works fine, except for the link. Field name is ‘link-artists-title’, and I’m using the following code:
$w( “#repeater1” ).onItemReady( ($item, itemData, index) => {
$item( “#image1” ).src = itemData.mainImage;
$item( “#text28” ).text = itemData.artType;
$item( “#text25” ).text = itemData.title;
$item( “#text27” ).text = itemData.genre;
$item( “#text26” ).text = itemData.shortDescription;
$item( “#button2” ).link = itemData.link-artists-title;
} );
Problematic line is: $item( " #button2 " ).link = itemData.link-artists-title;
The problem seems to be the dash in the fieldkey.
I was trying also: $item( " #button2 " ).link = itemData[‘link-artists-title’];
But no luck!
Thank you for your help!!