Skip to content

Instantly share code, notes, and snippets.

@bennuttall
Last active November 12, 2015 19:30
Show Gist options
  • Save bennuttall/a7ada6a8c83f74cc9e0d to your computer and use it in GitHub Desktop.
Save bennuttall/a7ada6a8c83f74cc9e0d to your computer and use it in GitHub Desktop.
Gravity Forms bug
<?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);
<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