It’s good that you know about 2 views.
I can offer 2 other variants:
- Write function
preDisplayto fileview.detail.phpof your module and change data in array$metadataFile. - write javascript for changing data in frontend on form
DetailView.
Perhaps there are more options