mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 15:05:42 +00:00
MINOR: sort submissions based on newer ones first
This commit is contained in:
parent
8b84f9caa9
commit
c7b6639d1e
@ -21,7 +21,7 @@ class SubmittedFormReportField extends FormField {
|
||||
$pageStart = isset($_REQUEST['start']) && is_numeric($_REQUEST['start']) ? $_REQUEST['start'] : 0;
|
||||
$pageLength = 10;
|
||||
|
||||
$items = $this->form->getRecord()->getComponents('Submissions', null, null, null, "$pageStart,$pageLength");
|
||||
$items = $this->form->getRecord()->getComponents('Submissions', null, "Created DESC", null, "$pageStart,$pageLength");
|
||||
$formId = $this->form->getRecord()->ID;
|
||||
|
||||
foreach(DB::query("SELECT COUNT(*) AS CountRows FROM SubmittedForm WHERE ParentID = $formId") as $r) $totalCount = $r['CountRows'];
|
||||
|
Loading…
x
Reference in New Issue
Block a user