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

OptionMeaning
$name, $values, $selectedName (default phone); unused; the number.
js_options, id, force_idintl-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