The Instructure Community will enter a read-only state on November 22, 2025 as we prepare to migrate to our new Community platform in early December. Read our blog post for more info about this change.
Found this content helpful? Log in or sign up to leave a like!
I see in an archived post that some users were able to add code to only allow students to change thier Display Name (not ALL names).
Here is the post:
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.
Could anyone send me the instructions for actually adding this code. I don't really work with Javascript, so I am having trouble getting it to work.
Thanks.
Hi @JodyBurzinski,
Someone might be able to look into this a little more if you provide a link to the archived post.
Can you please reply back to this post and include a link to that post for us?
-Doug
Solved: [ARCHIVED] Change only Display Name? - Instructure Community - 117821
Here is the original archived post. Thank you.
Thank you for that link, @JodyBurzinski, and I appreciate the patience.
I am far from a JavaScript expert, even though my institution does have a JS file that we use for a couple of tweaks that we have decided to use from the Community.
DISCLAIMER: A user could disable the loading of JavaScript files (either temporarily or permanently or a specific file) and be able to edit their "Full Name", "Display Name", or "Sortable Name".
This primarily involves three steps:
// Allow Editing the "Display Name" for a Canvas User Account but No Other Name Fields
// https://community.canvaslms.com/t5/Archived-Questions/ARCHIVED-Change-only-Display-Name/td-p/117821
// https://community.canvaslms.com/t5/Canvas-Question-Forum/Change-only-display-name/td-p/654281
document.getElementById('user_sortable_name').readOnly = true;
document.getElementById('user_name').readOnly = true;
NOTE #1: The lines in the JS file with "// " are comments.
NOTE #2: When I did this in my Canvas beta environment and went to edit a user account's settings, the user account's "Full Name" field was automatically highlighted but not editable.
I hope this is helpful.
-Doug
Thank you. I will give this a try in our Test Environment. I hope this suggestion makes it to a Canvas release soon.
Community helpTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign inTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign in