Skip Navigation

[Resolved] Run a voting contest

This support ticket is created 7 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 8 replies, has 2 voices.

Last updated by Nicholas 7 years, 2 months ago.

Assisted by: Luo Yang.

Author
Posts
#479951

Hi,

I'd like to run a competition by which any user (logged in or not logged in) can vote for a user-submitted product. Users should be able to vote for multiple products rather than just one. Example:

- Contestants create a product which is displayed in a view
- Other users can vote for these products.
-The products with the most votes show up on top using a custom filter.

How would I get started? Is this currently possible with Toolset?

All the best,
Nicholas

#480159

Dear Nicholas,

I suggest you try these:
1) Setup a custom post type "Vote" as child post type of "product"
https://toolset.com/documentation/user-guides/creating-post-type-relationships/

2) Create a CRED form for user to create the child "Vote" post:
CRED Forms for Child Content
https://toolset.com/documentation/user-guides/cred-forms-for-child-content/

3) Create a view to query the "Vote" posts, filter by:
Post author is the same as the logged in user
https://toolset.com/documentation/user-guides/cred-forms-for-child-content/
If there isn't any posts found, then display the CRED for of step2)

#480195

Hello Luo.
Thank you for your assistance.
How would I set up the CRED form?

There should be a "vote up" "vote down" button displayed on the product view afterwards that counts the users up and downvotes.

#480792

To setup the CRED form, please check our documents:
https://toolset.com/documentation/user-guides/#cred-topics

For the new question:
There should be a "vote up" "vote down" button displayed on the product view afterwards that counts the users up and downvotes.

It is depends on what kind of "vote up" "vote down" button do you need, for example you can create a custom radio field with two options: "vote up" and "vote down"
https://toolset.com/documentation/user-guides/using-custom-fields/

Then put it into your CRED form for user to choose
https://toolset.com/documentation/user-guides/creating-cred-forms/

#480843

Hell Luo.
Thank you for the docs.
I am quite familiar with CRED, but just don't know how to get started setting up a vote up vote down button that should also count the amount of upvotes and downvotes.

How would I count the upvotes and downvotes using your radio field approach?

Regards,
Nicholas

#480854

Could you describe more details for the question:
get started setting up a vote up vote down button

What kind of vote up vote down button do you need?

#480900
upvote.jpg

Hello.
Here's a screenshot.

I would also like to use views to filter the posts/content with the most upvotes or the most downvotes.

Regards,
Nicholas

#481246

There isn't exact same feature within CRED form, you can use some custom codes (JS/CSS) to turn the custom radio field into button, see similar thread:
http://stackoverflow.com/questions/5523735/how-to-make-a-radio-button-look-like-a-toggle-button

but it needs custom codes, according to our support policy, we do not provide custom codes support:
https://toolset.com/toolset-support-policy/

I suggest check out our certified partners for it:
https://toolset.com/consultant/

#482676

Thanks Luo.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.