Title: Disable user to edit fields
Last modified: August 21, 2016

---

# Disable user to edit fields

 *  Resolved [Manoela](https://wordpress.org/support/users/mmcmsp/)
 * (@mmcmsp)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/disable-user-to-edit-fields/)
 * Hi! Is it possible to disable user from editing one group of fields in his profile?
   Only admin would edit those fields.
 * I have two groups of fields – the profile one and another called “leave”. The“
   leave” is information that only admin can change about the user.
 * Thanks.
 * [http://wordpress.org/plugins/buddypress-xprofile-custom-fields-type/](http://wordpress.org/plugins/buddypress-xprofile-custom-fields-type/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [donmik](https://wordpress.org/support/users/atallos/)
 * (@atallos)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/disable-user-to-edit-fields/#post-4002550)
 * Yes, you need to change the code in your theme. If you are using buddypress default
   theme, the file you need is located in:
 * /wp-content/plugins/buddypress/bp-themes/bp-default/members/single/profile/edit.
   php
 * Inside the while loop, you need to check if the field which is going to be displayed
   is the field you want to hide.
 *     ```
       <?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?>
       <?php if (bp_get_the_profile_field_name() == 'leave') continue; ?>
       ```
   
 * I think this should work. You can hide usign javascript also, but it’s better
   this way I think.

Viewing 1 replies (of 1 total)

The topic ‘Disable user to edit fields’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/buddypress-xprofile-custom-fields-
   type.svg)
 * [Buddypress Xprofile Custom Fields Type](https://wordpress.org/plugins/buddypress-xprofile-custom-fields-type/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/buddypress-xprofile-custom-fields-type/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/buddypress-xprofile-custom-fields-type/)
 * [Active Topics](https://wordpress.org/support/plugin/buddypress-xprofile-custom-fields-type/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/buddypress-xprofile-custom-fields-type/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/buddypress-xprofile-custom-fields-type/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [donmik](https://wordpress.org/support/users/atallos/)
 * Last activity: [12 years, 9 months ago](https://wordpress.org/support/topic/disable-user-to-edit-fields/#post-4002550)
 * Status: resolved