Display number of entries for checkbox selections?

By: John Bosley | Asked: 08/04/2023
ForumsCategory: How-toDisplay number of entries for checkbox selections?
John Bosley asked 9 months ago
I have a site and want users to be able to leave reviews. I want them to have the option to select applicable keywords for each business. Let's say those keywords are: red, green, yellow. I currently have a checkbox field set up on the form with the keywords as checkbox options.    I have figured out how to display all of the checked options, but it reads something like: red, red, green, red, yellow, green. I want it to show: red - 3, green - 2, yellow - 1. Is this possible with checkboxes? Or do I need to use a different type of field? 
1 Answers
Rob LeVineRob LeVine answered 9 months ago
Two ways I can think of: 1. Use frm_setup_new_field_vars (https://formidableforms.com/knowledgebase/frm_setup_new_fields_vars/), clear the checkbox options and insert new ones after with the information you want, making sure to use set them up as "separate values" so you can save a different value to the database than is on the screen.  2.Use jQuery to make an ajax call, collect the numerical info and visually update the checkbox text

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