How to Set form to readonly based on user's role

I will like to know how to set form (populated with input elements) to readonly based on the user’s role.
Thanks

Community Page
Last updated: