• Hi. First of all, wonderful plguin, thanks for that.

    I have a client who needs to display the number of persons who have filled a form. Is there a way to get that total value for a concrete form id (which is in fact on each form admin page, on right column) and display it on a custom WP Page?

    Thanks in advance!

    http://wordpress.org/plugins/wordpress-form-manager/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Each form stores its data in a separate table. You can get the total submission count by counting the number of rows in that table using the $wpdb object. Here is an example:

    $submission_count = $wpdb->get_var( "SELECT COUNT(*) FROM wp1_fm_data_1" );
    echo "<p>Submission count is {$submission_count}</p>";

    You can then encapsulate that into a shortcode using the Shortcode Exec PHP plugin.

    I know this post is a couple of weeks old, but I hope this helps. 🙂

    Thread Starter pezflash

    (@pezflash)

    Hi. Thanks a bunch, i got it running. THe only thing to mejtion, is that i needed to add the $wpdb as a global bar.

    global $wpdb;
    $submission_count = $wpdb->get_var( "SELECT COUNT(*) FROM wp_fm_data_1" );
    echo $submission_count;

    Leave here the final code in case there is someone with the same need.

    Kind regards.

    manakuke

    (@manakuke)

    Nice addition 🙂

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Get number of forms filled’ is closed to new replies.