Comparing
#7 with
#8
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.