Hello community! I'm quite new to Wix Code / Corvid. I have an event site (productcamprtp.org) and we just had our annual event yesterday. I'd like to give attendees a way to write a review, including a rating, about the event. I'd like to show their individual review and star rating in a repeater. I've found this article on collecting & displaying ratings, but it only talks about showing aggregate rating data such as total # of ratings, average rating overall and the sum of all ratings submitted. https://support.wix.com/en/article/corvid-tutorial-capturing-and-displaying-ratings
How to simplify this to only show one user's rating in their collector box?
Thanks for the help!
No response so I'll explain further.
I'm wanting to collect ratings on a Leave a Review page, and display the ratings on another page that displays individual ratings in a repeater. I have a database called Testimonials with a field key RatingSingle that is meant to collect ratings. On the Leave a Review page, I have a ratings display element that is not connected to a database (per above tutorial instructions). Since I don't care about average ratings, total # of ratings and sum of ratings, I stripped out that code from the Leave a Review page. The code on my Leave a Review page is below. I've tested it and cannot submit the form. What should I do?
// For full API documentation, including code examples, visit http://wix.to/94BuAAs $w.onReady(function () { //TODO: write your page related code here... }); export function ratingsInput1_change(event) { $w("#dataset1").onReady(() => { // get the current item from the dataset const currentItem = $w("#dataset1").getCurrentItem(); // get the new rating from the ratings input const newRating = $w('#ratingsInput1').value; // save the dataset fields to the collection $w('#Testimonials').save() .catch((err) => { console.log('could not save new rating'); }); }); }