phone_box() form()
A phone field with a country flag picker and a formatted number (intl-tel-input), checked in the browser by formvalidation.
form()->phone_box($name = '', $extra = [], $replace = [])Опції
| Опція | Значення |
|---|---|
$name | Default phone. |
selected, value | The number; default $replace[name]. |
(html options) | See html()->phone_box(). |
Приклад
Not run here: the browser check needs formvalidation 0.6.2, a commercial library the framework does not ship (
$.fn.formValidation is undefined). The demo shows the field with that error.Код
return form(['phone' => '+380441234567'])->phone_box();Примітки
- Validate the number on the server too; for a plain field use tel() / phone().
Див. також: html/phone_box, form/html5_inputs, demo:form/boxes/phone_box