NB: Make sure you do a back up of your theme, files and database before attempting the tutorials
---- Last modified : Oct 01 2022
Estimated reading time : 1 minute, 57 seconds - 254 words
Formidable form shortcodes are very diversified and time savers where you can display stats and create charts with the data obtained from your forms.
Your Formidable Form Shortcode
Change the ID by your form’s ID or paste it directly in your form’s page.
Votre shortcode vue Formidable Form
For example, you can display your form entries via SQL data and filter them accordingly.
Once you’ve determined how to display your results, you can display the shortcode on a page or post for example.
Change your ID by the one of the view you want to display or copy it directly.
[display-frm-data id=x filter=limited]
If you want to display results of logged in users, you’ll need to add an additional parameter in the shortcode.
Make sure to have a User ID field in your Formidable Form.
[display-frm-data id=x filter=limited user_id=current]
Your shortcode for statistics
Here’s an example for a shortcode that returns statistics for form entries in the last 30 days.
In our example, ID 129, represents a field ID from our form. Simply replace it by one of the field IDs of your form
You can also create a custom entry field ID via shortcode.
This is needs to be a count type and not total.
[frm-stats id="129" type="count" created_at_greater_than="-1 month"]
In another example, you could display the total of your form’s custom field or values matching Yes (For example, return the total of entries for field ID 25 matching Yes).
Your field ID could be for a custom field from your form.
[frm-stats id=x type=total 25="Yes"]