How to show how many users have contacted you in your form (and get more contacts in the process)

An easy way to add social proof to your form is to display how many users have submitted it before, in this tutorial i am going to show you how to do exactly this.

We will need to do 2 things:

1.- A service that get us the number of entries for a given form.

2.- A formula that uses that service to populate a field.

1.- Creating the service


1.-The first thing we need to do is to create an empty extension. You can create it like this

2.- In this extension we are going to add the following code:

This code is part of wordpress and is used to be able to contact our service, a detailed explanation is beyond the scope of this tutorial but you can just copy it and paste it into your extension. Notice that our service name will be called ‘sf_entry_count’

In this section we are loading the SmartForms api and we are configure it to query the information of the form 162 (which is the id of the form that i used for this tutorial)

Here you are telling the api to get you the number of forms submitted.


2.- Creating the formula

Once you have your service ready we can use it in any field using formulas like this:

1.- Add the field that is going to display the entries count (in this tutorial i used a text field).

2.- Select the field and click the formula icon

3.- Add the following formula:

this formula basically will contact the service that we did in the section before and will display its result.


And that’s it! Now your field will display how many entries you have received