Hi @Jeyaram19
Another way you can achieve this is via JavaScript, you can get the user roles using JS/Liquid and then set the fields enabled/disabled:
$(document).ready(function () {
var roles = "{{ user.roles }}";
var isAdmin = "{{ user | has_role: 'Administrators' }}"
console.log("Is Admin: " + isAdmin);
console.log("User Roles: " + roles);
});
Note that this method might be simpler, but taking a quick look at the method proposed by @justinburch, it seems to be safer, so just take that into account
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.