inserting to database

Check the permission of your collection if you have set it to “Anyone” who can create content for that specific collection.

You can also try and add this piece of code to bypass the permission of your collection.

let options = {
“suppressAuth” : true ,
“suppressHooks” : true
};

wixData . insert ( “Shoes” , toInsert, options ). then (() => { $w ( “#textmessage” ). text = “YES.” ;