email(), login() form()

An email field (type email, @ icon) and a login field (text, user icon), with the usual default names.

form()->email($name = '', $desc = '', $extra = [], $replace = [])
form()->login($name = '', $desc = '', $extra = [], $replace = [])

Options

OptionMeaning
$nameDefault email / login.
prependIcon; default CLASS_ICON_EMAIL / CLASS_ICON_LOGIN; '' for none.
(input options)Every option of input().

Example

Code

return form(['login' => 'anna', 'email' => '[email protected]'])
    ->login()
    ->email()
    ->email('backup_email', 'Backup email', ['prepend' => '']);

Notes

  • The browser checks the email format; the server checks it with the valid_email rule.

See also: form/password, form/validate