How to make whole form read only through custom js

I want the whole document to be read only. I don’t want to do every field through set_df_property and neither do I want to have submittable document.

IS there anyway to make whole document readable?

read only based on what? If based on user then it is possible by setting role permission. If it is based on status then possible through workflow. Explain your usecase