none
how to hide "New item or edit this list" from the list

    Question

  • I want to hide  "New item or edit this list" link from the list.

    Please let me know step by step.




    • Edited by Jake Conny Sunday, April 16, 2017 7:08 AM
    Sunday, April 16, 2017 7:05 AM

Answers

  • Hi Basim,

    You can also use the below simple approach:

    • Click on Gear wheel and select Edit Page
    • Edit the list webpart and change the Toolbar Type to "No Toolbar" as shown below:

    • Click ok and stop editing the page

    Regards, Sathiya

    • Marked as answer by Jake Conny Monday, April 17, 2017 5:26 AM
    Monday, April 17, 2017 5:17 AM

All replies

  • Use Below below CSS to Hide...

    td.ms-list-addnew.ms-textXLarge.ms-list-addnew-aligntop.ms-soften {
        display: none;
    }
     

    If you wants to achieve through JS, Use below Code in CEWP...

    $("td[class='ms-list-addnew ms-textXLarge ms-list-addnew-aligntop ms-soften']").hide();

    If you wants to hide that section for certain people, Create new group with Read Only Permission and add user into that groups..

    Create and Manage Groups


    • Edited by Dillibabub Sunday, April 16, 2017 7:52 AM
    • Proposed as answer by romeo doncaMVP Sunday, April 16, 2017 8:18 AM
    Sunday, April 16, 2017 7:47 AM
  • Please let me know where i need to paste this js code in content web part directly or make some file.

    please let me know step by step.

    because i dont have experience of java script.

    Sunday, April 16, 2017 9:31 AM
  • Edit the "All Items.aspx" page of particular list, than click on "Add Web Part" link, In the Ribbon Section you can add "Content Editor Web Part"(Which is Under media and content category section).After that add below code in the CEWP.

    <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
    <script type="text/javascript">
    $(document).ready(function(){
    $("td[class='ms-list-addnew ms-textXLarge ms-list-addnew-aligntop ms-soften']").hide();
    });
    </script>

    Follow Below link how to add CEWP...

    http://www.ashokraja.me/post/Easy-method-to-convert-a-SharePoint-2013-Content-Editor-WebPart-into-Tab-Pages.aspx



    • Edited by Dillibabub Sunday, April 16, 2017 9:53 AM
    Sunday, April 16, 2017 9:46 AM
  • I paste this code to one notepad file and then save file on desktop then upload file to site assets.

    add content editor web part and type the url in the content web part 

    for e.g : http://epm/pwa/demo/SiteAssets/Forms/AllItems.aspx/hidecontrol.txt

    press ok button . and then close the page

    but nothing is  work even content web part is showing at top of the page.

    see below snapshot

    Sunday, April 16, 2017 10:17 AM
  • Looks like your reference is incorrect, if you uploaded the .txt file in site assets in the sense, the file URL will looks like below way...

    E.g : http://epm/pwa/demo/SiteAssets/hidecontrol.txt...

    Please follow below screen shots on how add JS code in CEWP...

    Step 1:

    Step 2 : Click On Edit Source to paste JS Code...

    Step 3: Click on "Ok" button and Click "Stop Editing" to save changes..

    Sunday, April 16, 2017 11:15 AM
  • Another Approach to add your txt file in CEWP...

    Step 1 : First Edit the Page and Go to Web Part property of the CEWP..

    Step 2: Paste your .txt reference in Content Link Textbox..

    E.g http://epm/pwa/demo/SiteAssets/hidecontrol.txt

     Step 3 : Finally Click on "Apply" or "Ok" button to save your changes

    Sunday, April 16, 2017 11:20 AM
  • for both approaches internet must be working because in script there is a URL which is required internet. am i right or wrong ?

    <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>

    Sunday, April 16, 2017 11:35 AM
  • Are you using SharePoint on-promise or SharePoint online? If your using On-Promise,Download jquery in local and upload it SharePoint Site Asset Library...And refer that js in above script...
    Sunday, April 16, 2017 12:30 PM
  • Hi Basim,

    You can also use the below simple approach:

    • Click on Gear wheel and select Edit Page
    • Edit the list webpart and change the Toolbar Type to "No Toolbar" as shown below:

    • Click ok and stop editing the page

    Regards, Sathiya

    • Marked as answer by Jake Conny Monday, April 17, 2017 5:26 AM
    Monday, April 17, 2017 5:17 AM