widgets\ActiveForm field()

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.

See also $fieldConfig.

public yii\widgets\ActiveField field ( $model, $attribute, $options = [] )
$model yii\base\Model

The data model.

$attribute string

The attribute name or expression. See yii\helpers\Html::getAttributeName() for the format about attribute expression.

$options array

The additional configurations for the field object. These are properties of yii\widgets\ActiveField or a subclass, depending on the value of $fieldClass.

return yii\widgets\ActiveField

The created ActiveField object.

doc_Yii
2016-10-30 17:18:04
Comments
Leave a Comment

Please login to continue.