Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hirejordansmith/5be2d3b6a0eed8337c0c68a6052905f3 to your computer and use it in GitHub Desktop.
Save hirejordansmith/5be2d3b6a0eed8337c0c68a6052905f3 to your computer and use it in GitHub Desktop.
How to get the total number of entries for a Gravity Form
<?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