How do you set a field to be ReadOnly in backoffice?

We are doing an integration and the customer wants the fields imported from the ERP to be locked for edit in backoffice.
Since you are not supposed to be able to edit the source data, we would like to set them as ReadOnly.

How do you set a field to be ReadOnly in code?

Litium version: 6.1.1

from slack:
image

You have to create a new field to get readonly functionality since that is currently not possible in the field framework.

Example: https://github.com/martenw/LitiumReadonlyTextField