DpGp
DpGp

Reputation: 131

Yii active form

Im facing a issue with activeForms that extend the activeRecord. Call to undefined function textInput()

field($model,'fname').textInput()->hint('Please Enter your Full Name');?>

I have defined the namespace: Yii helpers and the wii widgets active Form in the begining of the view.

Has anyone got this error? Can anyone tell me if i have missed out anything?

Upvotes: 0

Views: 101

Answers (1)

ScaisEdge
ScaisEdge

Reputation: 133400

Yuo have an error in the code use -> instead of . for textInput()

like this :

<?= $form->field($model, 'name')->textInput()->hint('Please enter your name')->label('Name') ?>

Upvotes: 1

Related Questions