Displaying Database Tags in a Repeater

That console-logs looks not good :sweat_smile:
It’s not recommende to have so much errors on your site, if you want to create a well working website.

ok… Im scared…
I am scared, too. :rofl:

Well i am still not sure if i at least understood your issue completely.
Your problem is the type of value in the databse? (tags / text)?

You write here…

I need to display the tags included in my collection that has been collected via input element from a form.

export function repeater1_itemReady($item, itemData, index){
   let options = [];
   let tags = itemData.tipoActividad;

   console.log("Item-Data: ", itemData)
   console.log("Index: ", index)
   console.log("Tags: ", tags)

   for(var i =0; i < tags.length; i++){        
       options.push({"label": tags[i],"value": tags[i]})
       if(i===tags.length){$item("#selectionTags2").options = options;}
   }
}

Ok, but how do your DATAFIELD —> “tipoActividad” in your DB looks like, after the values were collected via input element from a form into your DB?

Can you show a DB-Screenshot of this field?

Here you can see 2-different scenarios… (Example):

  1. First one has normal TEXT → STRING-Type
  2. Second one is formated as TAGS → Array of individual STRINGS or STRING-Groups.


Now the question is, how is structured your DATAFIELD —> “tipoActividad”?

As i already told you, try to work more with CONSOLE-Logs, they will help you to debug your problem.

Run the shown code above and see what exactly you get for all the logs…

console.log("Item-Data: ", itemData)
console.log("Index: ", index)
console.log("Tags: ", tags)