HPSM - JavaScript - How to set field read-only

Hello experts,

I am having problem with setting up desired field Read-Only through JavaScript function.


I want to use this function to set up Read-Only fields into Process Designer, not displaying forms every time I want to restrict one field.

Best regards,