phone_box() html()
A phone input with a country flag picker and the number formatted as typed (intl-tel-input, jQuery).
html()->phone_box($name = 'phone', $values = [], $selected = '', $extra = [])Options
| Option | Meaning |
|---|---|
$name, $values, $selected | Name (default phone); unused; the number. |
js_options, id, force_id | intl-tel-input options over the defaults (countries of geo_countries, preferred UA, BY); ids. |
Example
Code
return html()->phone_box('phone', [], '+380441234567');See also: form/phone_box, demo:html/phone_box