Related Items Task field

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
bnunweiler
Posts: 11
Joined: Tue Jun 10, 2014

15 Jul 2014

I've been trying to set the Related Items field attribute "target" in SharePoint Tasks to, "_blank", so that the item opens in a new tab. I can set it in the IE DOM explorer, but I can seem to set it using fd.field or the JQuery $('.relateditemname').attr("target","_blank"); at design time.

Am I missing something simple? Has anyone else had any luck with this?

Thanks

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

17 Jul 2014

Hello,

Please, assign 'related-items' to CSS class of your related items control and put the following code into JS-editor:

$('.related-items .ms-vb-title a').attr('target', '_blank').attr('onclick', '');

hp
Posts: 26
Joined: Thu Jan 15, 2015

10 Nov 2014

Hi! I am trying to do same. I have added the script but it doesnt change. Could you please elaborate it little more. I think i am missing which css class to assign the field and where. Thanks in advance!

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

11 Nov 2014

Hi,

You should assign a CSS class to the related items control you need to modify:

Image

hp
Posts: 26
Joined: Thu Jan 15, 2015

11 Nov 2014

Hi Thanks for quick replay. I have added the css class but it's not taking effect. may be class that is being modified is different than ms-link?

hp
Posts: 26
Joined: Thu Jan 15, 2015

11 Nov 2014

if this helps. i am trying to modify related items within task

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

12 Nov 2014

Hi,

I cannot find mentions of 'ms-link' class in this thread, Please, make sure that you're trying to do the same thing as the topic starter did: to open items from the related items control in a separate window. Make sure that the Render property of the related items is set in Server.

hp
Posts: 26
Joined: Thu Jan 15, 2015

19 Nov 2014

Hi,

yes i am talking about same issue. i tried to attach screenshot but it didnt get attached that's why its confuising what i wrote in post. But i understand solution you suggested it doesnt work. one more thing that i noticed was when i open the form in forms designer, click on 'Related item' under Field it's showing ID, internal name but type is showing as 'unknown'. thanks

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

20 Nov 2014

Hi,

I'd suggest to upload screenshots to OneDrive or Dropbox, share them publicly, and put the links here. As for the Unknown type, Forms Designer outputs TypeAsString property of SharePoint field. It seems that 'Unknown' is the value of TypeAsString property of the Related Item field.

hp
Posts: 26
Joined: Thu Jan 15, 2015

02 Dec 2014


Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 25 guests