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

Question

Question

Hide form logo when saving as pdf

asked on September 18, 2018

Hi All,
I am hiding/unhiding a logo in Form Title based on the combo box selection using Jquery.  It works fine.  

However, when the same form is saved as a pdf in the Repository, the logo is shown on the Title even though the form is not showing the logo.

Any ides how to prevent the logo showing up in Title in pdf. 

Note:-  I am using a custom Theme.
             Laserfiche Forms Professional Version 10.2.1.246

Thanks
 

1 0

Answer

SELECTED ANSWER
replied on September 18, 2018

When you have the form editor open, there is a "copy" button in the top right toolbar.

When the same variable is used on another form, the values automatically carry over.

For example,

If I have a field with a variable named "Field1" on Form 1 and I submit the form with a value of "1" any subsequent form using that same variable will retain the value.

So, when we copy an entire form, the fields are all referencing the same variables as the original and when the form is submitted those values are saved and will appear in any subsequent form in which they are present.

0 0

Replies

replied on September 18, 2018 Show version history

My solution has always been to create a separate version of the form specifically for the PDF. As an example, I like my forms to be in color with a browser-friendly font when the user fills them out, but when I save the PDF I want something that will print in black and white and has a cleaner font.

As a result, when I finish my form I create a copy and rename it something like "form - final" and remove color, logos, etc. from that version. Finally, in the Save to Repository task I tell it to use my bare bones form instead of the stylized one I display in the user tasks.

NOTE: The problem you're having is that jQuery/JavaScript runs in the client browser; when the form is saved to the repository it never opens in a user's browser, so your code is not being executed in the same way as you would expect.

1 0
replied on September 18, 2018

Hi Jason
Thanks for the suggestion and explaining why the form still shows logo.

I agree, creating a separate form to save it as pdf is a better approach.  

One thing is not clear to me is that how you would make a copy of a form that will retain the values and use it in the same Form Process?

Please advise.

Thanks for your help
 

0 0
SELECTED ANSWER
replied on September 18, 2018

When you have the form editor open, there is a "copy" button in the top right toolbar.

When the same variable is used on another form, the values automatically carry over.

For example,

If I have a field with a variable named "Field1" on Form 1 and I submit the form with a value of "1" any subsequent form using that same variable will retain the value.

So, when we copy an entire form, the fields are all referencing the same variables as the original and when the form is submitted those values are saved and will appear in any subsequent form in which they are present.

0 0
replied on September 18, 2018

FYI Javascript does run during the save-to-repository task. The Forms backend uses a 3rd party tool called wkhtmltopdf to render the form, and it does support javascript. There are some caveats to this:

  1. The tool has some timeout, so if your javascript takes too long to run, it may not execute all the code.
  2. When a form is rendered for display only (such as on the Thank You page, or during a StR task), the input/select/textarea elements are converted into other elements such as stylized div tags. In many cases, if you write javascript that targets the interactive elements, it will not interact with the read-only div element that displays on the saved copy.
1 0
replied on September 18, 2018

True, it does run, but it is a nightmare trying to get it working correctly. As you said, it converts elements into other types and there's no way to really test the results apart from saving it to the repository over and over so I just avoid JavaScript-dependent styling changes entirely.

0 0
replied on September 18, 2018

Hi,

Personally, I prefer to use a workflow to populate my final document.

I means, my Web Form is optimized for a screen (reduce space between fields, reduce text, ...) not optimized for a print.

So I get the values from my Web Form, then, using workflow, I retrieve this values to populate a new PDF document for Laserfiche.

 

Exemple :

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

Sign in to reply to this post.