Hello everyone !!! I can’t fix the error.
In the view I output echo $ form- & gt; textField ($ model- & gt; employees, "full_name_ru", array ('size' = & gt; 60, 'maxlength' = & gt; 255));
– & gt; employees is the garter in the 'employees' = & gt; array (self :: HAS_MANY, 'RefEmployeesMahala', 'mahala_id', 'order' = & gt; 'position_type ASC')
. How do I fix this error? Yii1 project
Answer 1, authority 100%
textField ()
implies that the first element is the model or its name, you are passing an array of related models (employees
), which leads to a failure in the CHtml :: modelName . If you need to output textField ()
for each linked model, do so in a loop.
Answer 2, authority 25%
Don’t pass an array where you need to pass a string