Change only Display Name?

Jump to solution
astirling917
Community Novice

Ok, I've scoured through the discussions, Canvas guides, and random Google searches ... I'm looking for any assistance someone with way better JavaScript skills than me can provide.

Does anyone have a custom script that will allow me to hide an option on the profile edit page for students? I'm trying to allow them to only change their display name, but not the full name that is assigned via the SIS.

I know that there is a Feature Idea in product radar stage about this specifically, but I was just wondering if anyone had a work around right now. 

Thanks for any help you can provide,

Anna

1 Solution
c_carrillo1
Community Participant

We were able to allow our students to change their Display Name without allowing them to change their full name or sortable name by adding the following two lines to the universal javascript code in the theme editor:


document.getElementById('user_sortable_name').readOnly = true;
document.getElementById('user_name').readOnly = true;

 

These two lines gray out the full name and sortable name options.  To enable them to edit the Display Name field, you still have to set the option to allow students to edit their names in the Admin Settings.

 
 

View solution in original post