Skip to content

Latest commit

 

History

History
32 lines (24 loc) · 841 Bytes

email.md

File metadata and controls

32 lines (24 loc) · 841 Bytes

Email Field

Represents <input> element of type "email" that lets the user enter and edit an e-mail address, or, if the "multiple" attribute is specified, a list of e-mail addresses is accepted. Documentation:

Usage Example

Widget:

use Yiisoft\Form\Field\Email;

echo Email::widget()
    ->name('EmailForm[main]')
    ->value('')
    ->label('Main email')
    ->hint('Email for notifications.')
    ->inputId('emailform-main');

Result will be:

<div>
    <label for="emailform-main">Main email</label>
    <input type="email" id="emailform-main" name="EmailForm[main]" value>
    <div>Email for notifications.</div>
</div>