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

Question

Question

Forms CSS 2000 Character Limit

asked on November 5, 2013 Show version history

LF Forms has a 2000 character limit for CSS, and I’ve just hit that.  Is it possible to use External Style sheets?  If so, what’s the appropriate location to store the sheet and where would I call the sheet from?  I’ve tried making the call from the Script page after copying all the CSS into the external style sheet but that doesn’t seem to work.

0 0

Answer

APPROVED ANSWER
replied on November 5, 2013 Show version history

The 2000 character limit for both CSS and JavaScript will be removed in Forms 9.1. 

 

For now, it is fairly straightforward to include an external CSS file reference.

 

On the machine hosting the Forms Server, navigate to C:\Program FIles (x86)\Laserfiche\Laserfiche Forms\Forms\js.

 

Put your css file there.

 

Add the following code to the JavaScript section of the Script page for the form:

 

 

Code:



$(document).ready(function () { 
$('head').append('<link rel="stylesheet" href="http://FormsServer/Forms/js/test.css" type="text/css" />');
}) 

 
Replace FormsServer with the server name or IP address of the Forms Server (don't use "localhost") and replace test.css with the name of your CSS file.
 
0 0

Replies

replied on November 5, 2013

Can this be done with Javascript as well? I knew about adding in javascript libraries to a folder on the server but did not know to add a javascript function for adding the library.

 

Also, what is stopping you from inserting a custom HTML field with the reference to the CSS stylesheet?

0 0
replied on November 6, 2013

Yes, you can also include external JavaScript references.

 

See http://www.laserfiche.com/support/webhelp/laserficheforms/9.0/en-us/forms/#CustomizingYourFormExamples.htm#IncludingExternalJavaScriptFiles for more information.

 

 

0 0
replied on October 11, 2016

Is there still currently a character limit on CSS? I am having issues once I reach a certain point.

You are not allowed to follow up in this post.

Sign in to reply to this post.