Hey guys,
I’m trying to figure out how to add a rating input & display to a dynamic page.
I’ve tried to follow a couple of guides online but I don’t seem to get it to fully work out, seems most of the guides are not using dynamic pages? (Also, i’m completely new with all of this so i’m pretty unaware of what all the codes mean and how they function. But i’m really dedicated to learn!)
I have a database with all my information that I display on different pages with repeaters, from those pages you can choose to view one specific item that displays on a dynamic page - from this page I want people to be able to rate the chosen item(once). This rating I want to store in the database for the chosen item(average rating, number of ratings, sum of ratings), calculate, and show the average rating on a display rating on the same dynamic page.
So I guess that we want to get the ID from the chosen item to be able to store it in the correct column in the database.
We also need to store the id from the person who rates, to make sure that he/she can’t keep on rating the same item many times. Will I need to add so that people can create an account on my site for this, or can we store it with for example IP? Also, will I need to create an additional database for all of this to work out?
This below is my latest try to figure it out. I’ve added a second dataset “#dataset2” to write-only since my first dataset were read-only to display all the information from the database.
Once I try to review this page and rate an item I get this error message(below). It also adds new rows in my database without information, so not only does it not connect to the chosen item-row, it does not capture any of the ratings chosen.
I would be super happy if someone could try to help me out here, I’ll keep on digging into this and learn what i’m doing wrong in the meanwhile!
Kind regards,
Simon