OmgDef / yii2-multilingual-behavior

Yii2 port of the yii-multilingual-behavior.
146 stars 60 forks source link

input form label and hint #66

Open daunt opened 7 years ago

daunt commented 7 years ago

im try using label and hint <?= $form->field($model, 'title')->textInput(['maxlength' => true])->hint('test hint')->label('test label');?> getting same errors

Call to a member function label() on string

Call to a member function hint() on string

and i was trying to edit dinamic eval class but error the same above eval(' namespace '.$namespace.'; use yii\db\ActiveRecord; class '.$this->langClassShortName.' extends ActiveRecord { public static function tableName() { return \''.$this->tableName.'\'; }

             public function attributeLabels(){
                $label = [
                    \'title\' => Yii::t(\'core\', \'test label\'),
                ];
                return $label;
            }

            public function attributeHints(){
                $label = [
                    \'title\' => Yii::t(\'core\', \'test hint\'),
                ];
                return $label;
            }
        }');

i need to custom hint and label for lang model how to fix this?