开发者

How to disable link on “Created By” column vale of a list item in SharePoint 2010

开发者 https://www.devze.com 2023-02-14 03:39 出处:网络
I saw this answer by Shoban: Go to List - > Settings -> List Settings Under \"Columns\" Click \"Created by\" to open column settings

I saw this answer by Shoban:

  • Go to List - > Settings -> List Settings
  • Under "Columns"
  • Click "Created by" to open column settings
  • Under "Additional Column Settings" Change Show Filed to "Name".
  • Repeat the above steps for 'Modified by"

» This will just Show the Name and will not have the link.

This does not work in Sharpoint 2010 I still get a link when Show Feild is set "Name". Anyone have a solution for 开发者_运维知识库SharePoint 2010?


I have found a solution using JQuery.

Unfortunately in Sharepoint 2010 when a View has collapsed groups, this script will not work. The only way around this that I could find is to have them 'expanded' by default.

Ensure that your page has a reference to a modern version of JQuery, and add the following to your View:

<script type="text/javascript">
$(document).ready(function() {

    // Remove "Contact" links
    $('a[href*="userdisp.aspx"]:visible=false').each(function(index) {
        var link = $(this);
        $(this).after("<span>" + link.text() + "</span>");
        $(this).remove();
    });
});
</script>


I just did a 2010 site choosing Name from the show field choices. Worked like a charm for 2010 for me. Next stop 2013


The above method works fine for SharePoint 2010.

0

精彩评论

暂无评论...
验证码 换一张
取 消