General developer forum

How to remove user's field when creating or editing users' profile

 
Picture of Michael Milette
Re: Odgovor: Re: How to remove user's field when creating or editing users' profile
Core developersParticularly helpful MoodlersPlugin developers

Hiding some of the optional the fields in the profile edit page is pretty straight forward. The bigger challenge is to hide these fields from users when one views either their own or someone else's profile.

Depending on your requirements, you may also want these fields to be visible when managers or administrators are editing a user's profile.

Just a couple of things to keep in mind.

Best regards,

Michael

 
Average of ratings: -
Picture of Chardelle Busch
Re: Odgovor: Re: How to remove user's field when creating or editing users' profile
Core developers

Hello,

I typically "hide" several things on the profile page using css.

The timezone is a tricky one, if you are wanting to hide it using #fitem_id_timezone  {display: none;} and it isn't working, you need to go to Administration>Location>Location Settings and for Force Timezone, you must set it to:  Users can choose their own timezone (however, they obviously won't be able to because it is hidden). 

If that setting is set to force a timezone, then that field becomes uneditable and no longer includes the fitem timezone class notation. 


 
Average of ratings: -