1

I'm using the Solspace Rating module and I'd like to be able to allow the user to toggle their vote on ratings.

If a user votes up but later wants to "unvote" or change their vote how can I accomplish this? It seems that I can allow duplicate votes, but this does not solve the problem.

1 Answer 1

2

You can delete a rating using the {exp:rating:delete} tag: http://www.solspace.com/docs/rating/delete/

After deleting the rating, the user can try and rate again. That would be the "unvote".

3
  • rating:delete works for the entry rating, but is there a way to delete the rating_vote?
    – atomicglue
    Feb 8, 2014 at 13:58
  • You could downvote a rating vote. From the documentation: ... you’ll need to create "up/down" voting links in your Rating:Entries loop, like this (URI vote options are up/yes and down/no). See Rating:Rating_Vote_Stats documentation for more information.
    – Solspace
    Feb 11, 2014 at 1:48
  • Thanks for your help. I'm trying to only allow only one option for the vote. If a user votes up on his first vote, I want to limit his second vote to only the down option and vice versa. This is to prevent users from submitting multiple up votes and spamming the tally. I'm trying to do this with conditionals and the previous_vote variable, but it seems that previous_vote is only showing the FIRST vote not the previous vote. I've checked the database and the second vote is being recorded but not reflected in the previous_vote variable. Any ideas?
    – atomicglue
    Feb 12, 2014 at 0:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.