• Hi, for once, I am posting a solution, not a problem. I had quite a headache with it and am happy to share it.

    Imagine, in the profile form, you have a field (in our case: user role) that you only want to make editable by specific roles, like admins.They should be visible to all, though.

    1. you can do this where you set the fields in the profile form: In your backend, you go to UltimateMember > Forms > profile (or however your profile form is called).
    2. You insert the field you want to SHOW (like “role (dropdown)”).
    3. In the newly inserted field, you click the pencil to edit its settings. You set “visibility” to “View mode only”. In the privacy options, you set this field to “Everyone”. Save. –> you will have this field only when the form is displayed for showing. It will disappear if anyone clicks on “edit profile” (you might wanna check that).
    4. You insert ANOTHER field (or just make a copy of the field you inserted in 2.).
    5. For this field, you click the pencil to edit its settings. This time, you set “visibility” to “Edit mode only”. In the privacy options, you set this field to “only specific member roles”, and in the select list below, you click those roles you want to be able to edit them – i.e. administrators, editors, … Save.

    Voilà. You have one field in the view mode, visible to all, editable to none. It will disappear when edit is on. Magically, another field takes its place, visible and editable only to some groups.

    You could program visibility of both fields even more sophisticated with conditional field support (in the edit window for the field, at the very bottom): You might want to have the editable field switched on if the user is in one AND another user group, or in one OR the other user group, or in one user group AND having a location in “Berlin” or whatever. With this feature, you could have an admin being allowed to edit all users with locations in “Deutschland”, and another admin in locations like “France” or whatever.

    You need this somehow complicated solution because it is cumbersome with settings in UltimateMember, to have ONE field visible to ALL but editable only to SOME – that does not seem to work out, or am I missing something there?

    🙂 Claus

    • This topic was modified 2 days, 17 hours ago by clausfaber.
  • You must be logged in to reply to this topic.