Skip to content

Latest commit

 

History

History
31 lines (23 loc) · 770 Bytes

telephone.md

File metadata and controls

31 lines (23 loc) · 770 Bytes

Telephone Field

Represents <input> element of type "tel" that lets the user enter and edit a telephone number. Documentation:

Usage Example

Widget:

use Yiisoft\Form\Field\Telephone;

echo Telephone::widget()
    ->name('TelephoneForm[number]')
    ->value('')
    ->inputId('telephoneform-number')
    ->label('Phone')
    ->hint('Enter your phone.');

Result will be:

<div>
    <label for="telephoneform-number">Phone</label>
    <input type="tel" id="telephoneform-number" name="TelephoneForm[number]" value>
    <div>Enter your phone.</div>
</div>