Get a total for a specific option with checkbox field

By: Pedro Magalhães | Asked: 09/26/2023
ForumsCategory: General questionsGet a total for a specific option with checkbox field
Pedro Magalhães asked 10 months ago

I have two options created with a checkbox. The Checkboxes Field have an id of '10'

I want to display the total count of votes on option 1 and the total counts of votes of option 2.

if i use [frm-stats id=10 type=count] it's going to show me the total count of votes of both options.

In the page https://formidableforms.com/knowledgebase/add-field-totals-and-statistics/, it's says to use the entry parameter to get a total for a specific entry or entries. Gives the example of [frm-stats id=x type=star entry="250,252,255"]

I don't want the star as type so i've changed that to 'count' but i dont know the value of option 1 and option 2 to put in the entry.

Probably the solution is something like: [frm-stats id=x type=count entry="opt1"] Please help.. Many thanks

2 Answers
Robert Taylor answered 1 month ago
Just had to do this my self and it appears the link provided is not exactly what I was looking for.  Instead, you can count checkboxes in a question field with something like this: [frm-stats id=10 type=count 10="option 1"] The 10="option 1" is what tripped me up.  That basically says, count everything in field 10 that matches the value of "option 1".  Obviously, update that to match what you named your check boxes. You probably already figured this out, hopefully this helps out other noobs out there.  

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right