Can I add all the available tags of selectiontags to a database regardless of users selection? E.g show tag1, tag2, tag3 and tag4 of selectionTag1 in one database item.
top of page
Important forum update
This forum is migrating to one unified Wix community forum starting July 26th, and will be read-only during the process.
![feature fixed.png](https://static.wixstatic.com/media/3bfa8a_f845e1016b8a49758acdd6edd6610c3b~mv2.png/v1/crop/x_0,y_2,w_852,h_508/fill/w_104,h_62,al_c,q_85,usm_0.66_1.00_0.01,enc_auto/feature%20fixed.png)
Wishlist Page is the official platform for requesting new features. You can vote, comment, and track the status of the requested features.
bottom of page
Hello.
You can do this by declaring an array and assign an array of all the tags you have to the array then insert this to a collection. See sample code below:
$w("#selectionTags1").onClick((event) => { let tags = ['tag1', 'tag2', 'tag3', 'tag4']; let toInsert = { "tags": tags }; wixData.insert("myCollection", toInsert) .then((results) => { let item = results; //see item below }) .catch((err) => { let errorMsg = err; }); });
Good luck!