form count display

By: Randy Murray | Asked: 11/16/2023
ForumsCategory: General questionsform count display
Randy Murray asked 5 months ago
Randy Murray replied 5 months ago

It seems like a simple thing to do but I am having trouble. How do I auto count the total number entries submitted via a form and then display that total on a home page? example is 10 forms submitted and the total shows in a defined section on the home page. thanks

Rob LeVineRob LeVine replied 5 months ago

You can create a custom shortcode like the following:
function my_entry_count($atts){
$entries = FrmEntry::getAll(array('it.form_id' => X)); // replace X with your form id
return count($entries);

Victor Font replied 5 months ago

You can also use FrmEntry::getRecordCount(" = '84'"). Replace the '84' with your form id.

Randy Murray replied 5 months ago

Thank you both. Got it.

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