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

Discussion

Discussion

Line Breaks when Loading Variable into Custom HTML Field

posted on September 30, 2017

I have a multi-line field that properly stores values with their lines breaks.  However when I call that value into a Custom HTML field in another form that I am saving into Laserfiche, it loses those line breaks and instead shows as one long line.  It appears that the Custom HTML cannot handle the line break characters so I tried replacing them with <br/> but it rendered the actual tag instead of putting in a line break.  It appears that it loads the values after the HTML has been rendered and therefore will not use any HTML tags loaded directly into the variables.  And since it also will not recognize the line break characters, how do we go about putting a variable from a multiline field into a custom html?  I'm hoping I am just missing an obvious step.

Here is the multiline variable with the line breaks showing properly in forms and then what it looks like in the Laserfiche document when rendered in a custom HTML field:

 

Here it is again where I replaced the line breaks with <br/>:

 

I also tried with <br> and "&lt;br/&gt;" as that is how workflow wanted to encode it.  Any guesses how to do this or is it just not possible in this version?

0 0
replied on September 30, 2017 Show version history

Well, I figured out I have to add to my css for that field for it to respect line breaks.  Here is what I added to my css in case anyone else runs into this question.

.class  {white-space:pre-line;}

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

Sign in to reply to this post.