On one of my sites, I use Formidable Forms. I need monthly numbers (simple counts) on submissions for these forms. My current solution is to use this shortcode built-in from Formidable:
[frm-stats id=862 type=count created_at_greater_than="2023-12-31" created_at_less_than="2024-2-1" ]
This shortcode would give you the number of form submissions for January 2024
The problem is that I need the prior twelve months to be shown, so this is repeated 12 times. And then I do this for multiple forms, so I've got about a hundred of these shortcodes so far and that number is slowly growing.
These must be updated manually, so every year I have to spend way too much time updating all these dates in these shortcodes. I'd like to find a way to populate the created_at_greater_than
and created_at_less_than
parameters automatically.
Could someone help me figure out a way to put some sort of variable into this shortcode, or possibly point me in the direction to get started making my own custom version of this shortcode that suits my needs?
I don't mind writing php for this, I just honestly don't know where to start since this is an existing plugin I'd be interacting with, and I'm hoping some folks in the community with more experience can help guide me here.