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)Опції
| Опція | Значення |
|---|---|
$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']). |
Приклад
Код
return html()->radio_box('delivery', ['k1' => 'key1', 'k2' => 'key2'], 'k1');Див. також: form/radio_box, html/button_radio_box