difficulty with calc field in layout

Hi! I'm using the calc field to display information from another dropdown field. However, in the layout I export in PDF, the items appear with a 'dot' before them.

I've tried removing this via inline CSS, inside the field, and I was unsuccessful.

Has anyone been through this and was successful in customizing it?

Thanks!
 
Enable "Debug PDF" in Fabrik Options, this will display the HTML generated for the PDF on your screen (on the screen you perhaps won't see the dots).
Examine the calc (HTML structure, classes) for what to set e.g. in your custom PDF layout CSS.
 
thanks for the answer @troester

But it did not work :(

When I activate the PDF debugging, I located the HTML structure and Classes, I assembled the CSS, I inserted the PDF template layout, but when I disable the debugging, the problem remains, there is a 'dot' before each item returned.

Was there another solution?

Thanks!
 
Last edited:
We're not seeing what you're doing.
Please copy and paste your calc code here, and a screenshot of the area with that 'dot' in your PDF.
 
Is {table___Full_Element_Name} a multi-select dropdown, then rendering as <ul>?
You'll then need CSS like <ul style="list-style: none;">
 
This is not really a Fabrik question...
As I said:
Examine with DebugPDF on your screen what is sent to the PDF lib.
It doesn't matter if it's showing the dots on the screen, the browsers render a bit different from PDF libs.
But you can check all computed CSS for ul and li etc.

Are you doing the formatting yourself inside the calc or are you using the Fabrik formatting (i.e. calculating with {element_raw} or {element}?
Fabrik repeat data has
<ul class="fabrikRepeatData"..> <li>...
 
Hi @troester !

Inside the calc field is written:
return '{table Full Element Name}

When I activate the debug PDF, I can see the structure of the PDF template (td > ul > li), but when I customize "ul", "fabrikRepeatData" or "li", it just doesn't work, as if CSS doesn't be interpreted in the PDF template.

I'm putting the CSS inside the PDF theme I created with '{element}'.


Other CSS customizations for this theme worked fine, only this one didn't.

Where am I wrong in this process I'm doing?

Thanks to all for your help!
 
Not sure what you mean with "I already insert in css "<ul style = "list-style: none;">".
This is not CSS but HTML.
As I said: examine the source code with PDFdebug, what do you get exactly for your complete calc element?

If you don't see the Fabrik repeatData class try to add something like
ul {list-style: none!important;} to your custom_css.php of your PDF details template.
 
exactly @troester .
The problem is when the pdf is generated, because when the pdf debug is enabled, the content works without 'problems'.

I'll leave some screenshots of my theme below.

this question is kind of desperate :(

Sorry for the inconvenience of asking you this.

Are there still other actions I can take?



My custom_css.php


upload_2021-9-23_17-23-30.png

My template_css.php

upload_2021-9-23_17-25-2.png


My default.php with CSS

upload_2021-9-23_17-26-36.png

my html view (with debug pdf)
upload_2021-9-23_17-33-17.png
 
Add some repeat element to list view (e.g. your original element you use in the calc), what happens?
Switch to domPDF, what happens?
 
@troester , i've already added another element and the same thing happens. The "dot" appears before each item.

I've tried using domPDF and I wasn't successful, neither in this project nor in another project. The best I found was mPDF.

Is there anything else I can do?
 
I think as long as you are creating the output in a calc yourself you can use the raw data (or some string replacement) and modify ul li to something like
aaa
<br>
bbb
 
@troester ,sorry for my little knowledge, but let me get this straight.

would I have to create a structure with for example <p></p> inside the calc or in the template I'm creating?
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top