yii\widgets\ActiveForm::beginField PHP Method

beginField() public method

This method will create a new form field and returns its opening tag. You should call ActiveForm::endField afterwards.
See also: endField()
See also: field()
public beginField ( Model $model, string $attribute, array $options = [] ) : string
$model yii\base\Model the data model.
$attribute string the attribute name or expression. See [[Html::getAttributeName()]] for the format about attribute expression.
$options array the additional configurations for the field object.
return string the opening tag.
    public function beginField($model, $attribute, $options = [])
    {
        $field = $this->field($model, $attribute, $options);
        $this->_fields[] = $field;
        return $field->begin();
    }