We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, I'm starting to use YII2, but I'm having an error when updating select2.
my controller `
public function actionUpdate($id) { $model = $this->findModel($id); $alunoModulo = new AlunoModulo(); $alunoModulo = AlunoModulo::find()->where(['id_modulo'=>$id])->All(); if ($model->load(Yii::$app->request->post()) && $model->save()) { return $this->redirect(['index']); } else { return $this->render('update', [ 'model' => $model, 'alunoModulo'=> $alunoModulo, ]); } } `
My View: `
`
error: Call to a member function isAttributeRequired() on array
thanks
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered:
Same issue here, did you find a solution?
Sorry, something went wrong.
No branches or pull requests
Hi, I'm starting to use YII2, but I'm having an error when updating select2.
my controller
`
public function actionUpdate($id)
{
$model = $this->findModel($id);
$alunoModulo = new AlunoModulo();
$alunoModulo = AlunoModulo::find()->where(['id_modulo'=>$id])->All();
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['index']);
} else {
return $this->render('update', [
'model' => $model,
'alunoModulo'=> $alunoModulo,
]);
}
}
`
My View:
field($alunoModulo, 'id_aluno')->widget(Select2::classname(), [ 'data' => ArrayHelper::map(User::find()->where(['role_id'=>3])->all(),'id','username'), 'language' => 'br', 'options' => ['placeholder' => Yii::t('app', 'Select the student ...'),'multiple' => true,], 'pluginOptions' => [ 'allowClear' => true, ], ]);?>`
`
error:
Call to a member function isAttributeRequired() on array
thanks
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: