Answer the question
In order to leave comments, you need to log in
How to display data from linked table in edit form?
Available:
public function getOrg0()
{
return $this->hasOne(Org::className(), ['id' => 'org']);
}
/* @var $model app\modules\users\models\User */
.....
<?= $form->field($model, 'org0.name')->textInput() ?>
<?= $form->field($model, 'org')->textInput() ?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question