display a link to a lookup field on an edit form
- This topic has 1 reply, 2 voices, and was last updated 9 years, 10 months ago by .
Viewing 1 reply thread
Viewing 1 reply thread
- You must be logged in to reply to this topic.
Home › Forums › SPJS-Lookup › display a link to a lookup field on an edit form
I have a Acknowledgement list, it links a user with a document from a separate list and asks them to edit the form and click the “I agree” button. I’d like the edit form to have the hyperlink to the document in it, is this possible?
Add the field “FileDirRef” to the ViewFields section in vLookup, and add this to the “Special configuration”:
{"function":"buildLinkToDocument"}
Then add this to the Custom JS:
function buildLinkToDocument(a,b){
return "<a href='"+b.get_item("FileDirRef")+"/"+b.get_item("FileLeafRef")+"' target='_blank'>Link</a>";
}
See attached images for details.
Alexander