Comments 4Sebastian Gendry started the conversationMarch 13, 2021 at 1:28amHello, Please confirm: The average rating in https://wpdatatables.com/documentation/table-examples/catalog-of-books/ is coming from the database, which means it is set by admin in the backend. (How) Would it be possible to have users vote on any entry in the front-end and dynamically rank the entries with the most votes? Thank you. 2,572Aleksandar repliedMarch 15, 2021 at 12:36pmHello SebastianIt can't be edited by users - you wouldn't be able to allow them to vote. I mean, you wouldn't be able to do it through wpDataTables. The data for that example table is fixed.There is some conditional formatting to the "stars" column: Each content (<span class) has these in order: <span class="stars-container stars-96">★★★★★</span> <span class="stars-container stars-90">★★★★★</span> <span class="stars-container stars-85">★★★★★</span> <span class="stars-container stars-80">★★★★★</span> <span class="stars-container stars-70">★★★★★</span> <span class="stars-container stars-60">★★★★★</span> And the classes are defined in wpDataTables settings/Custom JS and CSS/Custom CSS field, like: .stars-container{ font-size:20px !important; } .stars-container { position: relative; display: inline-block; color: transparent; font-size: 50px; line-height:normal; } .stars-container::before{ position: absolute; top: 0; left: 0; content: '★★★★★'; color:lightgray; } .stars-container::after { position: absolute; top: 0; left: 0; content: '★★★★★'; color: gold; overflow: hidden; } .stars-0::after { width: 0%; } .stars-10::after { width: 10%; } .stars-20::after { width: 20%; } .stars-30::after { width: 30%; } .stars-40::after { width: 40%; } .stars-50::after { width: 50%; } .stars-60::after { width: 60%; } .stars-70::after { width: 70%; } .stars-80::after { width: 80%; } .stars-85::after { width: 85%; } .stars-90::after { width: 90%; } .stars-96::after { width: 96%; } .stars-100::after { width: 100%; } I hope that helps.Kind Regards, Aleksandar Vuković[email protected] Rate my support wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community You can try wpDataTables add-ons before purchasing on these sandbox sites: Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables 4Sebastian Gendry repliedMarch 15, 2021 at 4:05pmGood to know. Thank you for explaining how this works! 2,572Aleksandar repliedMarch 16, 2021 at 2:19pmYou're welcome, SebastianIf you have any further questions or issues, please feel free to open a new ticket, and we'll gladly help.Kind Regards, Aleksandar Vuković[email protected] Rate my support wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community You can try wpDataTables add-ons before purchasing on these sandbox sites: Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables Sign in to reply ...
Hello,
Please confirm: The average rating in https://wpdatatables.com/documentation/table-examples/catalog-of-books/ is coming from the database, which means it is set by admin in the backend.
(How) Would it be possible to have users vote on any entry in the front-end and dynamically rank the entries with the most votes?
Thank you.
Hello Sebastian
It can't be edited by users - you wouldn't be able to allow them to vote. I mean, you wouldn't be able to do it through wpDataTables. The data for that example table is fixed.
There is some conditional formatting to the "stars" column:
Each content (<span class) has these in order:
And the classes are defined in wpDataTables settings/Custom JS and CSS/Custom CSS field, like:
I hope that helps.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Good to know. Thank you for explaining how this works!
You're welcome, Sebastian
If you have any further questions or issues, please feel free to open a new ticket, and we'll gladly help.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables