display a link to a lookup field on an edit form

Forums SPJS-Lookup display a link to a lookup field on an edit form

Viewing 1 reply thread
  • Author
    Posts
    • #14506
      Jeff Lynch
      Participant

      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?

    • #14547
      Alexander Bautz
      Keymaster

      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

Viewing 1 reply thread
  • You must be logged in to reply to this topic.