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?
Question
Question
Embed dynamic picture in Forms
Replies
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.
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">
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.
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; } }); });
Would you have any idea why I'm getting this error?
Hi Katrina, please give more information for where did you get the error and what custom JavaScript you have added for your form.
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.