I’m trying to follow this post:
https://www.wix.com/corvid/forum/main/comment/5ea2838452db5e002d7704c3
The code from the post is below:
exportfunction repeater1_itemReady($item, itemData, index)
{
//get tags from db for an item
let tags = itemData.tags;
//prepeate hashmap with tags to be diplayed
for ( var i = 0; i < tags.length; i++) { options.push({ “label” : tags[i], “value” : tags[i]}); }
//Set tags UI component $item( “#selectionTags1” ).options = options;
}
But I would like to put it on a dynamic page instead. I’m a total novice at this, this is as far as I’ve gotten:
export function selectionTags1_itemReady(options)
{
//get tags from db for an item
let tags = $w( ‘#csdb’ ).getCurrentItem().caresheetTags;
//prepeate hashmap with tags to be diplayed
for ( var i = 0 ; i < tags.length; i++) { options.push({ “label” : tags[i], “value” : tags[i]}); }
$w( “#selectionTags1” ).options = options;
}
Don’t I need to call the function somewhere? Should the “export function” go some place other than the dynamic page’s code?
Thank you for taking a look.