Display Submissions Count for a Specific Form

Would you like to display a count of total submissions on your site for a specific form? The total number for form submissions can be helpful if you want to display the number of users who participated in a survey or have entered a contest.

Using Shortcode

The easiest way to display the total submissions of a form is by placing the following shortcode into any Joomla! Article or Custom Module.

{convertforms X submissions_total}

Just remember to replace the X with your own form ID. To find form ID, log into your backend, go to your Forms list and spot the last column in the list.

Keep in mind that this shortcode can't be used within the form, eg in a HTML field or a in a Hidden field.

Using PHP

Alternatively, for further calculations you can fetch the total submissions using PHP. For this case, Convert Forms exposes the following PHP API method:

$count = ConvertForms\API::getFormSubmissionsTotal($form_id);
echo 'This form has ' . $count . ' total submissions';

This method can also be used in the PHP Scripts section.

Last updated on Nov 26th 2024 12:11