Remove hyperlink from edit column

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
jpwallace
Posts: 47
Joined: Fri Mar 03, 2017

23 Feb 2017

I have the following code placed in the javascript editor on my display form to remove hyperlinks from lookup columns, when i put the same code in my edit form, the layout of the form changes (i lose my tabbed related items) and am still able to click lookup columns, what should i change in order to have this work on my edit form.

Code: Select all

$(document).ready(function() {
$('a[href*="RootFolder=*"]').each(function(index) {
var link = $(this);
$(this).after("<span>" + link.text() + "</span>");
$(this).remove();
});
});

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

27 Feb 2017

Hi,

Most likely, you have a syntax error in your edit form. Expand the browser console (F12) and check the error messages.

jpwallace
Posts: 47
Joined: Fri Mar 03, 2017

11 Apr 2017

Hi Dmitry,
I have checked for errors and one syntax error is appearing. Its an unrecognized expression: a[href*=RootFolder=*"]............what should I replace this with?

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

11 Apr 2017

Click the error in the console, most likely you just missed a quote somewhere.

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 21 guests