Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5980873
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T21:51:48+00:00 2026-05-22T21:51:48+00:00

I want to disable the option that allows users to select the different name

  • 0

I want to disable the option that allows users to select the different name fields(columns) available during a sharepoint library creation. I want the users to create a new column instead of chosing among the default available name columns. Is it possible to inject a script that disables these functions? or any other work arounds?

The document library is created from a custom library template. These name fields should be disabled only for libraries created from this particular template.

enter image description here

This is a Sharepoint 2010 app.

In general how to disable a default column option?

Any help appreciated, Thanks!

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T21:51:48+00:00Added an answer on May 22, 2026 at 9:51 pm

    Just in case some one is looking for an answer, am posting this

    The URL is the absolute URL from httpContext

    if (url.Contains(@"/_layouts/ViewEdit.aspx"))
                {
                    sb.AppendLine("Name Field script injection");
                    using (SPSite site = new SPSite(url))
                    {
                        sb.AppendLine("Site URL : " + site.Url);
                        using (SPWeb web = site.OpenWeb("/"))
                        {
                            sb.AppendLine("Web URL : " + web.Url);
    
                                string[] urls = url.Split('/');
    
                                sb.AppendLine("List Name:" + urls[urls.Length - 3]);
    
                                SPDocumentLibrary library = web.Lists[urls[urls.Length - 3]] as SPDocumentLibrary;
                                SPContentType contentType = library.ContentTypes["Document_Content_type"];
    
                                if (contentType != null)
                                {
                                    sb.AppendLine("Content Type Name:" + contentType.Name);
                                    InjectNameColumnScript();
                                    sb.AppendLine("Name Column Script has been injected");
                                }
                        }
                    }  
                }
    

    The script does something like this inside documet.getReady function

    $(document).ready(function() {
       $("#check box_ID").closest("td").parent().attr("style","display:none;");
     });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to disable click on a certain <div> so that when you select
I want to disable a hyperlink so that if user clicks on the link,
Say you have an app, that you want to provide users ability to browse
I have an iOS 5 application that allows users to enter username with international
I've set up a compiler /Za option to disable lanquage extensions so that compiler
I want to disable the Charging and Network identification in Windows phone emulator.. Is
I want to disable an input Box AND a button when a checkbox is
I want to disable all Foreign key constraints and re-enable them after, is there
I want to disable a particular key press in .NET(both VB.NET & C#.NET).``
I want to disable the stack trace getting generated when an exception is thrown.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.