field() public method
Generates a form field. A form field is associated with a model and an attribute. It contains a label, an input and an error message and use them to interact with end users to collect their inputs for the attribute.
public yii\bootstrap\ActiveField field ( $model, $attribute, $options = [] )$model yii\base\Model
The data model. $attribute string
The attribute name or expression. See yii\bootstrap\Html::getAttributeName() for the format about attribute expression.