Ok. I looked up the documentation. Now I’m trying to use, wixData.insert(), but it still doesn’t seem to work. Any thoughts?
// For full API documentation, including code examples, visit http://wix.to/94BuAAs
import wixLocation from ‘wix-location’;
import wixData from ‘wix-data’;
let url = wixLocation.url;
$w.onReady( function () {
//TODO: write your page related code here…
let ID = $w(“#button30”).onMouseIn( (event, $w) => {
//Add your code for this event here:
$w(“#text89”).text=“no”;
ID = $w(“#text89”).text;
return ID
});
$w("#input10").value = ID;
$w("#input5").value = url;
let toInsert = {
“Vote”: ID,
“Source”: url,
};
wixData.insert("Signups", toInsert)
.then( (item) => {
$w("#input10").value = item.Vote;
$w("#input5").value = item.Source;
} )
. **catch** ( (err) => {
let errorMsg = err;
} );
});