Last active
November 12, 2015 19:30
-
-
Save bennuttall/a7ada6a8c83f74cc9e0d to your computer and use it in GitHub Desktop.
Gravity Forms bug
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( | |
"status" => "active", | |
"field_filters" => array( | |
"mode" => "all", | |
array( | |
"key" => "2", | |
"value" => date('Y-m-d'), | |
"operator" => ">", | |
), | |
array( | |
"key" => "date_created", | |
"value" => date('Y-m-d', strtotime("-8 days")), | |
"operator" => ">=", | |
), | |
) | |
); | |
$sorting = array( | |
'key' => "2", | |
'direction' => "ASC", | |
); | |
$paging = array( | |
'offset' => 0, | |
'page_size' => 200, | |
); | |
$events = GFAPI::get_entries($form_id, $search_criteria, $sorting, $paging); |
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
<h2>Recent Submissions</h2> | |
<?php $search_criteria = array( | |
"status" => "active", | |
"field_filters" => array( | |
"mode" => "all", | |
array( | |
"key" => "2", | |
"value" => date('Y-m-d'), | |
"operator" => ">", // changed | |
), | |
array( | |
"key" => "date_created", | |
"value" => date('Y-m-d', strtotime("-8 days")), | |
"operator" => ">", // changed | |
), | |
) | |
); | |
$sorting = array( | |
'key' => "2", | |
'direction' => "ASC", | |
); | |
$paging = array( | |
'offset' => 0, | |
'page_size' => 200, | |
); | |
$events = GFAPI::get_entries($form_id, $search_criteria, $sorting, $paging); | |
include 'list-events.php'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment