I have the following code in my backend on my Wix site. It is meant to insert some values into a private data collection. Here it is:
export function insertDataMembers(username, email, password, wsmoStatus, ssmoStatus) {
let toInsert = {
'title': username.value,
'email': email.value,
'password': password.value,
'wsmoStatus': wsmoStatus,
'ssmoStatus': ssmoStatus
};
wixData.insert('members', toInsert, options);
}
When I call this from the frontend, it inserts a new row in the collection, but everything except for the hidden fields is blank. I'm using suppressAuth and suppressHooks. What's going wrong? (The wsmoStatus and ssmoStatus variables are booleans, the rest should be strings).
Oops, I just realized what was wrong. I also asked this on the Velo by Wix forum and got a reply there that helped me. I think the issue was that I was using .value but the variables I was using that on are not strings. I removed the .value and it worked, so I think that was it.