Hide field in detail view conditionally

@maciej.geciow

It’s good that you know about 2 views.
I can offer 2 other variants:

  1. Write function preDisplay to file view.detail.php of your module and change data in array $metadataFile.
  2. write javascript for changing data in frontend on form DetailView.

Perhaps there are more options