radio_box() html()
A bare group of radio buttons (no form row).
html()->radio_box($name, $values = [], $selected = '', $horizontal = true, $type = 2, $add_str = '', $translate = 0)Options
| Option | Meaning |
|---|---|
$name, $values, $selected | Name; value => label; checked value. |
$horizontal, $type, $add_str, $translate | In one line (default); compare by key (2) or label (1); extra attributes; translate. |
array form | radio_box(['name', 'values', 'selected', 'horizontal', 'class_add', 'force_id', 'outer_label']). |
Example
Code
return html()->radio_box('delivery', ['k1' => 'key1', 'k2' => 'key2'], 'k1');See also: form/radio_box, html/button_radio_box