<?=$form->field($model,'username')->textInput()->hint('Please enter your name')->label('Name')?>
```
This will create all the `<label>`, `<input>` and other tags according to the template defined by the form field.
To add these tags yourself you can use the `Html` helper class.
If you want to use one of HTML5 fields you may specify input type directly like the following:
```php
// creating a HTML5 email input element
<?=$form->field($model,'email')->input('email')?>
```
This will create all the `<label>`, `<input>` and other tags according to the [[yii\widgets\ActiveField::$template|template]] defined by the form field.
The name of the input field is determined automatically from the models [[yii\base\Model::formName()|form name] and attribute,
e.g. the name for the input field for the `username` attribute in the above example will be `LoginForm[username]` which will result in an array
of all attributes for the login form to be available in `$_POST['LoginForm']` on the server side.
Specifying the attribute of the model can be done in more sophisticated ways. For example when an attribute may
take an array value when uploading multiple files or selecting multiple items you may specify it by appending `[]`