bootstrap\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.

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.

$options array

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

return yii\bootstrap\ActiveField

The created ActiveField object

doc_Yii
2016-10-30 16:53:03
Comments
Leave a Comment

Please login to continue.