Forum Replies Created

Viewing 16 replies (of 16 total)
  • Thread Starter mackans

    (@mackans)

    Thank you so much Michael! It works great! Here’s the final code that’s working, in case someone else need it:

    <?php require_once(ABSPATH . 'wp-content/plugins/contact-form-7-to-database-extension/CFDBFormIterator.php');
        $exp = new CFDBFormIterator();
        $exp->export('NAME OF THE FORM', array('show' => 'submit_time', 'trans' => 'CountField(submit_time)'));
        $count = 0;
        while ($row = $exp->nextRow()) {
            $count = $row['submit_time'];
        }
        if ($count > 600 ): ?>
            //Content to show if number of submissions are greater than 600.
        <?php else : ?>
            //Content to show if number of submissions are less than 600.
            //For example, show the form <?php echo do_shortcode('[contact-form-7 id="112" title="NAME OF THE FORM"]'); ?>
        <?php endif; ?>

    Thank you again!

    /Marcus

Viewing 16 replies (of 16 total)