I have a Display Form that appears on a custom Site Page (~/SitePages/Matters/Details.aspx?item=[ID]) using a Form Webpart. That list (Matters) has a lookup column to another list (Contacts) called relatedContactLookup.
When the form displays, the lookup appears as the standard SP link which opens another tab/window. However, I want it to go to another Site Page for the Contact (~/SitePages/Contacts/Details.aspx?item=[ID]). I can do this redirect easy with a List/Library column (custom template properties).
I was looking at Customize Appearance for Lookup to see if I can somehow change the template of the “widget” to customize the anchor tag to go to the page I want.
Could anyone advise on how I might accomplish that? My attempts have been unsuccessful.
Thank you.
Edit: The code provided below works. Not sure why I thought that customizing the appearance of the lookup was the way to go.