top of page

CDI Blog

Writer's pictureCDI

Seeing is Believing - Building Web Access into an iframe inside Forms

Updated: Oct 6, 2022



September 2022 Consultants Corner

As a Laserfiche Forms Administrator, have you ever wondered if you could give your Laserfiche users a view of the Laserfiche repository from within a Form? Maybe you want to display a document in a form while the user is filling out the form? This month’s article will focus on how to set up Laserfiche forms to display the Laserfiche Web Client or display a document in a form.


Displaying the Web Client in Forms

To embed the web client on a Form page, you will need to modify the desired Form. Select the form in the designer.


What ‘s required:

  • A Custom HTML field.

  • HTML code with a “target” of the Web Client’s URL

  • (Optional) A text field to hold the URL to be placed in the Custom HTML


The steps to placing the Web Client on the form are the following.

  • Place a Custom HTML field on the form

  • Switch to the “HTML tab




  • Insert the following custom HTML code using the HTML tab in the Layout page of the form designer:

<iframe height=”620px” width= “100%” src="http://{servername}/laserfiche/browse.aspx?repo={repository}">

</iframe>

  • In HTML, the <iframe></iframe> indicates an “inline frame that is used to embed another page within the current HTML page.


Please note that height values should be in pixels; width values can be in percentage or pixels. I’ve used a height=”620px” to provide a useful area to display. You can modify the values to see what works on your form.


The “src=” value will be the URL that references your Web Client. For example, if you login to your repository using the Laserfiche Web Client, copy the URL that appears once you have logged in. Copy and paste that value inside double quotes.


The {servername} should already be in the URL text string, as well as the {repository name} value. In my case, my URL is http://localhost/laserfiche/browse.aspx?repo=LFTraining, so the src= value in the iframe markup would look like:


src=”http://localhost/laserfiche/browse.aspx?repo=LFTraining“



Here’s what the embedded field will look like in the form:




Optional

You can build other dynamic links to documents, directly, or by database lookup.


Here’s an example of a scanned brochure being presented by selecting it from a drop-down list in the field above the embedded Web Client.




This example uses a hidden field to store the static URL link to the document and uses some custom JavaScript to grab the URL and dynamically insert it into the src= setting of the <iframe> properties in the custom HTML field.


As you can see Laserfiche has several ways to embed Web Client content in a Laserfiche form. It’s up to your imagination to make Laserfiche Forms an exciting place for your users!





CDI NEWSLETTER

Stay up to date with all the latest Laserfiche news, CDI webinars, blogs, and more!



178 views0 comments

Comentários


news, knowledge, updates, tips & tricks, and more >
bottom of page