How to Remove Hyperlink from Lookup Columns in SharePoint?

Problem:
When we add a lookup column to any SharePoint list, it appears with the link to the parent item in SharePoint list views. The end-user often clicks on the lookup link and mistakenly edits the parent lookup item! People get confused about which link to click. So, we wanted to remove hyperlinks from lookup columns in SharePoint 2013 list views.

remove lookup hyperlink from sharepoint list view

Here is how to remove hyperlinks from lookup fields out-of-the-box without any coding and customization efforts.

  • Go to your list settings, pick the lookup column. In my case, it’s “Parent Project”. On the “Edit Column” page, select the “Title” field under the “Add a column to show each of these additional fields” Section as highlighted below. sharepoint remove hyperlink lookup field
  • Now, edit your list view, unselect the “Parent Project” field, and select the “Parent Project: Title” field. (You can rename this Title – BTW!)
    remove hyperlink from lookup column
  • Click “OK” to save the view. That’s all! This removes the link from hyperlink columns.
    sharepoint remove hyperlink from lookup

However, the Display form of the list still shows links in hyperlink fields, isn’t it? Proceed with the below method to remove hyperlinks from the lookup column. Although lookup field links can be removed using SharePoint designer-XSLT methods, I prefer this jQuery as it’s relatively simpler.

Lookup columns are pointing to link something like “https://Site/***&RootFolder=*”. So, let’s find all Anchor elements of the page with HREF attribute “&RootFolder=*”. And remove the link of the lookup.

To remove lookup hyperlink from SharePoint list view using jQuery, follow these steps:

  1. Go to your List view page, E.g. https://portal.crescent.com/Lists/ProjectMilestones/AllItems.aspx
  2. Click on Site Settings gear, click on the “Edit Page” menu item
  3. Click on Add a Web Part link shown on the page, Under “Media and Content” choose “Script Editor” and click on the “Add” Button
  4. Click on the “Edit Snippet” link on the Script Editor Web part and place the below code in it and save the page.
    sharepoint 2013 remove hyperlink from lookup column
<script type="text/javascript" src="https://code.jquery.com/jquery-1.2.6.min.js"></script>
<script type="text/javascript">
    $(document).ready(function() {
        $('a[href*="RootFolder=*"]').each(function(index) {
            var link = $(this);
            $(this).after("<span>" + link.text() + "</span>");
            $(this).remove();
        });
    });
</script>
To remove Hyperlink from Person or group fields using jQuery, Just replace the Line#4 with:
$('a[href*="userdisp.aspx?ID="]').each(function(index) { 

Salaudeen Rajack

Salaudeen Rajack - Information Technology Expert with Two-decades of hands-on experience, specializing in SharePoint, PowerShell, Microsoft 365, and related products. He has held various positions including SharePoint Architect, Administrator, Developer and consultant, has helped many organizations to implement and optimize SharePoint solutions. Known for his deep technical expertise, He's passionate about sharing the knowledge and insights to help others, through the real-world articles!

9 thoughts on “How to Remove Hyperlink from Lookup Columns in SharePoint?

  • Thank you! Very helpful.

    Reply
  • Worked great! Muchas Gracias

    Reply
  • Could this be updated for Modern Lists with JSON Formatting?

    Reply
  • Is there any way to drop the link so when the original lookup source is deleted, it will stay in the lookup field?

    Reply
  • Thanks for this. I tried to use it on my SharePoint 2019 classic site and while it did remove the links to the person columns as I was hoping for, it also removed the ITEMS and LIST ribbon tabs. Any thoughts on how to just get the person column?

    Thanks!

    Reply
  • The first example worked perfectly for me. Thank you!

    Reply
  • Hi,
    Thanks for your solution, but your solution remove any hyperlink like as Title, any why exist that can exclude some column?

    Reply
    • Thanks for your Solution, but I add LinkToItem=”TRUE” for column that want to hyperlink to view Item, unfortunately disable this hyperlink after your script, can you help me?

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *