Picture Rating Platform

Hey everyone,

What I’m trying to do:

  1. User uploads a picture to database (done)

  2. Another random picture from database is displayed to the user (done)

  3. User can rate this random picture (help)

Do you know how I allow the user to rate this randomly appearing picture?
I tried the WIX ratings input tutorial, but I don’t know how to link the rating to the picture.

Help is highly appreciated.

Thank you,
Adam

hey, Adam!

What do you mean by ‘link the rating to the picture’?

Check out another example : https://www.grampsworkbench.com/Examples/Ratings-by-User
It is working with default pages instead of the Stores Product page and you can see how ratings are connected to elements.

hey @yevheniias and thanks for the response.

Excactly, I wanted to connect ratings to elements.

Based on https://www.grampsworkbench.com/Examples/Ratings-by-User

  • adjusted the backend

  • created page, but instead of a lightbox just an uploaded picture (which is chosen randomly from the dataset)

However, there are some issues I would love to get some help on:

  1. the ratings output doesn’t get updated after a rating is given
  2. I receive warnings during “Preview”

  1. I receive an error message when giving a rating

  1. When the picture had a rating already, the rating is already displayed in the rating input element & giving the same rating does not do anything. Giving a different rating leads the the error of 3.

  2. After rating a picture, an entry is created in the database for ratings, however, without a PictureID, the primary field.

It seems like I’m not too far away from what I was thinking of, but I would really appreciate some help!