Hey there,
Hoping someone somewhere has the skills to help me out…
I’m using selection tags. The user clicks the tag to add to a collection. This collection is basically a ‘to do list’ that can be added to from anywhere on the site using tags (via a write only dataset), then accessed via a dedicated ‘to do list’ page which uses a repeater to show the list (Read & Write).
I have it all working perfectly except I’d like the tag to be submitted without using a button to submit it. Currently they click the tag then click a submit button which works but causes other problems.
Is there a way for the info on the tag to auto-submit to the collection when pressed? I’m thinking it will involve the on_click function on the tag, including some kind of submit function followed by the save function.
So far I have the below, but this saves a blank line in the collection … any ideas please??
export function selectionTags1_click(event) {
$w( "#dataset6" ).save();
}
Hello jobbojnr,
of course this code will just save an empty line, because there is no other code, what should be done. JUST SAVING, that’s all! Where is all the rest of your code?
- Data-quering
- Filtering-process
- Resulting
and so on.
Take a look at this example here…
https://russian-dima.wixsite.com/meinewebsite/filter-my-phones
…i think it could be similar to your issue.
Hey Russian-Dima,
Thank you so much for your reply. You’ll see from the limited code I have that I’m an absolute beginner with this stuff.
The code on your example is a lot more complex than what I’m looking for.
On the below I have the “add” tag and the “& Save” button. When the user clicks the “add” followed by the “& Save” a brand new line is created in the collection (this is what I want it to do).
I’d like to remove the “& Save” button so that user only needs to click the “add” tag and the new line is created with just one click …
Any ideas please?

Hey,
For anyone looking for this code, I found it!!! It looks like this …
export function selectionTags1_change(event){
$w( ‘#dataset1’ ).setFieldValue( “tagName” ,$w( ‘#selectionTags1’ ).value);
$w( ‘#dataset1’ ).save()
.then((item) => {
console.log( “data was saved.” );
})
. catch ((err) => {
let errMsg = err;
});
}