yii\widgets\ActiveForm::beginField PHP Méthode

beginField() public méthode

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.
Résultat string the opening tag.
    public function beginField($model, $attribute, $options = [])
    {
        $field = $this->field($model, $attribute, $options);
        $this->_fields[] = $field;
        return $field->begin();
    }