order_box() form()
Ascending / Descending radios, for the sort direction of a filter form.
form()->order_box($name = '', $data = [], $extra = [], $replace = [])Options
| Option | Meaning |
|---|---|
$name | Default order_direction. |
$data | Value => label; default asc / desc, translated. |
(radio options) | Every option of radio_box(). |
Example
Code
return form(['order_direction' => 'desc'], ['method' => 'get'])
->select_box('order_by', ['name' => 'Name', 'price' => 'Price'])
->order_box();See also: form/radio_box