chosen_box() html()

A searchable select on Chosen 1.7 (jQuery).

html()->chosen_box($name, $values = [], $selected = '', $extra = [])

Options

OptionMeaning
$name, $values, $selectedName; value => text; selected value(s).
multiple, js_options, placeholder, class_addSeveral values; Chosen options; empty text; classes.

Example

Code

return html()->chosen_box('input_name', ['k1' => 'key1', 'k2' => 'key2']);

Notes

See also: form/select2_box, html/select2_box