Services Plugins FAQs

I need help to allow users to only upvote a recipe once!

I need help to allow users to only upvote a recipe once in my app. Right now, they can press the Icon as many times as they want and upvote their recipe all day, and I can’t find how to make it so a user can only press the button once to upvote, then press it again to take their upvote out of the count! I believe I have to make a new data type in the database that will keep track of the the recipe and who liked it, so that you can easily use conditions and counts to accomplish the two conditions (One upvote per user, and take out the upvote with second click). Please help me if you can, I’m really stuck!

Hello @carson.a.woodruff, thank you for your message.

To allow the users to downvote a recipe there is needed to add an extra Workflow for the elements, thus when pressed twice the button will decrement the value added previously.

In our UpHunt template, this feature is present, I would recommend you to take a look and see how it should function. https://zeroqode.com/template/uphunt---upvoting-like-product-hunt-template-1507812247305x257803851702206460

As your question is related to Bubble’s functionality, rather than ZQ products I would also recommend you to check the below tutorial from Bubble - Building an Upvote System | Build Your First App [15/20] - YouTube

As well, check the below thread on Bubble’s forum to read more about how it can be achieved - 👍 Like and upvote buttons - The fastest method - #5 by talbotnar - Tips - Bubble Forum

Hope this helps!
Have a good rest of the week. :slight_smile: