Relational data fields display and edit with the yii2-detail-view extension

Comparing #7 with #8

Revision #8 was created by Kartik V Kartik V on Jun 9, 2014, 8:17:56 AM.

Corrected last line

Content

[...]
'data'=>ArrayHelper::map(Author::find()->orderBy('name')->asArray()->all(), 'id', 'name'),
]
]
```

Now that should resolve both the VIEW and EDIT issues for you. With the above configuration, users would still see the author `name` instead of `author_id` in both VIEW and EDIT modes. In the EDIT mode, the above configuration will
internally use the `author_id` to save data, but display the author names as a dropdown list using the `\kartik\widgets\Select2` widget.