You are viewing limited content. For full access, please sign in.

Question

Question

Embed dynamic picture in Forms

asked on November 26, 2014

Hi,
I am trying to embed a dynamic picture, or a Laserfiche document, in a Form.
Basically I have a set of documents that are being uploaded into the repository, then Workflow is notifying a user to commence a Form. That form has some metadata from the Laserfiche document, but I would also like to display the image of the document, for the user to see.

Is this possible, and how would this be done please?

0 0

Replies

replied on December 2, 2014

Hey Scott,

Another option is to throw an iframe in the form and link to either WebLink or Web Access. This way you could actually pull up the corresponding document from the repository in the form itself. Here is an in depth Solution Exchange article that outlines the process.

1 0
replied on November 27, 2014 Show version history

There are two options to embed the picture of the document:

1. embed the image directly from the repository,

2. export the image from directly, then embed to a form.

There is no easy way for option 1 unless you use Laserfiche SDK to get the image from the repository first then embed to form use custom HTML with JavaScript, but for option 2, you can use custom HTML like following to embed the image(You need to convert the image to png first for Firefox and Chrome not support tiff image)

<img src="http://v-sh-lf92/forms/img/document/SAMPLE 1.png" height="800" width="600">

 

0 0
replied on May 6, 2016

Xiuhong Xiang sorry to jump in on this topic but I am having a very similar issue. I've been able to get the My url link in the iframe however I'm not real versed on java and am having issues dynamically changing the link based on the variable assigned to the dropdown choices. Not using database for form lookup.

image.jpg
image.jpg (153.8 KB)
0 0
replied on May 9, 2016 Show version history

You can add a CSS class called "selectcss" to the dropdown and add a CSS class called "imagecss" to the custom HTML and use JavaScript like following to dynamic change the link.

 

$(document).ready(function () {
  
$('.selectcss').on('change',function(){
  var policy=$(".selector option:selected").text();
  alert(policy);
  switch(policy){
    case "policy 1":
      $(".imagecss img").attr("src","http://v-sh-2k8r2-4/forms/img/document/policy1.jpg");
      break;
    case "policy 2":
      $(".imagecss img").attr("src","http://v-sh-2k8r2-4/forms/img/document/policy2.jpg");
      break;
    case "policy 3":
      $(".imagecss img").attr("src","http://v-sh-2k8r2-4/forms/img/document/policy3.jpg");
      break;
  }
  });
});

 

0 0
replied on October 20, 2017

Hi Xiuhong-Xiang, would you care to elaborate on this? I tried following your advise but I'm getting an error. Pretty new to Laserfiche too blush

 

replied on October 24, 2017

Would you have any idea why I'm getting this error?

0 0
replied on November 22, 2017

Hi Katrina, please give more information for where did you get the error and what custom JavaScript you have added for your form.

0 0
replied on December 2, 2014

Hi,

Thanks for the great responses.  Depending on the application, both can be applicable, I have implemented Xiuhong's initially for the proof of concept.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.