This issue has never been resolved https://www.wix.com/corvid/forum/community-discussion/read-write-option-not-working
The issue is being able to create,edit and submit data to a field in the database.
Doron gave you the answer on that previous forum post
It is the same setup as on this Wix tutorial here.
https://support.wix.com/en/article/corvid-tutorial-building-your-own-members-area
Hi there,
I don’t want to add a custom login page, so I read the tutorial and tried to customize the code so you don’t need to push any button to create a new field in the data base for new members.
Here is my code but I don’t know why it doesn’t work. I checked everything couple of times:
import wixUsers from ‘wix-users’ ;
import wixData from ‘wix-data’ ;
import wixLocation from ‘wix-location’ ;
$w.onReady( () => {
let user = wixUsers.currentUser;
let userId = user.id;
wixData.query( “Member” )
.eq( “_id” , userId)
.find()
.then( (results) => {
if (results.items.length === 0 ) {
const toInsert = {
“_id” : userId,
};
wixData.insert( “Member” , toInsert)
. catch ( (err) => {
console.log(err);
} );
} })
})