getFilters
(Since 1.2.0) -- display PICK dropdown filters and search box
function getFilters($filters = null, $label = 'Filter', $action = null)
Display any dropdown filters associated with a listing page.
Parameters
| Parameter | Type | Details |
|---|---|---|
| $filters | STRING | (optional) A comma-separated list of columns to use as filters - Note -- a single text field is automatically included which searches the 'name' field, you may include additional field names to be searched but right now only Relational (PICK) columns are supported currently |
| $label | STRING | (optional) The descriptive label to appear along with the pagination |
| $action | STRING | (optional) The URL to submit the form (if different than current page) |
Examples
<?php
$pods = new Pod('pod_name');
$pods->findRecords('id DESC', 10);
echo $pods->getFilters('mypickcolumn1,otherpickcolumn', 'Search this list:');
?>
