How to set the field "read only" in edit view

Hi, everyone! I need to set some fields “read only” in the edit view. I used the ways to create view.edit.php file, but, maybe, there is more easy way?


  • you can simply remove those fields from the EditView
  • you could add custom JS that disables/hides those fields (could be dynamic too)

Otherwise, you could reset/calculate those fields with an hook (before save) or modify the controller. It depends on how safe your solution has to be.

1 Like