Created
September 12, 2016 20:18
-
-
Save hirejordansmith/5be2d3b6a0eed8337c0c68a6052905f3 to your computer and use it in GitHub Desktop.
How to get the total number of entries for a Gravity Form
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$search_criteria = array(); | |
$form_id = array(108, 109); | |
$start_date = date( 'Y-m-d' ); | |
$end_date = date( 'Y-m-d' ); | |
$search_criteria['start_date'] = $start_date; | |
$search_criteria['end_date'] = $end_date; | |
$result = GFAPI::count_entries( $form_ids, $search_criteria ); | |
$formatted_number = number_format($result); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment