Answer the question
In order to leave comments, you need to log in
Yii - through relation, forms. How to implement?
I'm completely confused, my head doesn't work, I can't save data to other models - I just don't understand what needs to be done.
Here I described how the models are made - another question . Please answer it too.
In general, I could not save the data in the PageCategoryPivot model, because I do not understand how to put it in the form (display the data by default), and then get new data and save it. With grief on the floor, I managed to edit the article (definitely not according to Feng Shui), but if you use the same form to create an article, it gives incomprehensible errors like
Fatal error: Call to a member function getErrors() on a non-object in C:\OpenServer\domains\framework\web\helpers\CHtml.php on line 2199
Answer the question
In order to leave comments, you need to log in
1. Why yii1 and not yii2?
2. Error with getErrors() because CHtml has no such method. We need to use activeForm to create validated forms.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question