list_box() html()

A styled select of bootstrap-form-helpers (bfh-selectbox) with a hidden input; the country boxes use it.

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

Options

OptionMeaning
$name, $values, $selectedName; value => text (may hold HTML such as flags); selected value.
class_add, idClasses; id.

Example

key1
key2

Code

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

Notes

  • Needs jQuery and the bfh-select asset (loaded by the control).

See also: form/country_box, html/div_box