I followed the steps on this video (https://www.youtube.com/watch?v=OuXiT4Rccvo), but I couldn't populate the member and the product on my DB. The other fields "content" and "rating"are working correctly.
I used this code, but I couldn't find what I'm doing wrong. Any guidance on this topic would be very much appreciated. Thank you in advance! import wixData from 'wix-data'; import {currentMember} from 'wix-members'; import wixWindow from 'wix-window'; $w.onReady(function () { const product = wixWindow.lightbox.getContext(); $w('#title').text = `Review ${product.name}` let member; const checkForMember = async ()=>{ member = await currentMember.getMember(); if(!member){ $w('#submitButton').disable(); } } checkForMember(); const submitReview = async ()=>{ const newReview = { content: $w('#contentInput').value, rating: $w('#ratingsInput').value, } const newReviewItem = await wixData.insert("Reviews", newReview) if(newReviewItem){ wixData.insertReference("Reviews","member",newReviewItem._id,member._id); wixData.insertReference("Reviews","product",newReviewItem._id,product._id); } } $w('#submitButton').onClick(submitReview) });