Skip to content
Advertisement

Fatal error: Call to a member function isAttributeRequired()

I am having the following form

JavaScript

The above form throws an error as

JavaScript

I am new you yii framework so i am unable to guess where the error is. can anyone help

Edit 1

JavaScript

Edit-2

If remove <?php echo $form->labelEx($model,'oldPassword'); ?> am getting error as

JavaScript

Advertisement

Answer

The $model variable does not contain a Model object, check if you you pass the correct object in render function.

ex for the create page:

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement