PDF of a single record

nofc_fro

Member
Hi,
I would need to create a PDF of a single record.
Example:
I have a list called "Address Book" that has these elements:
ID, First Name, Last Name, Phone
and two records:
1, Elvis, Presley, +0011111;
2, John, Lennon, +002222;

I would like to select the first record and generate a PDF.
How can I do?
 
Open the details view and click PDF.

Or if you want to do from list view:
add a calc element with e.g.
return '<a href="index.php?option=com_fabrik&view=details&formid=190&rowid={rowid}&format=pdf">create PDF</a>';
(replace 190 with your form id)
 
Open the details view and click PDF.

Or if you want to do from list view:
add a calc element with e.g.
return '<a href="index.php?option=com_fabrik&view=details&formid=190&rowid={rowid}&format=pdf">create PDF</a>';
(replace 190 with your form id)

Cool - I didn't know you could do this (the calc element) - makes sense now. I may use that - today!

Bob
 
You can also use one of your existing elements and add a "custom link".
But it may be a bit confusing to get a download pdf in this case.
 
Thank you!
If I wanted to add some personalized text?
For example clicking on the record generates a PDF with this text:
"Dear $ name, call us at this number ..."
 
Okay, and how can I get this result? :)
For example, if I wanted to print a precompiled invoice to the customer "Franz", I would click a custom button next to this record, and I should still use only some fields.
 
Last edited:
If you want to work with custom templates you'll need to know about HTML, CSS and PHP.
Use your browser dev console to inspect elements, get the CSS classes, test modifications on the fly etc.

Here is how to create a custom template by using single elements.
http://www.fabrikar.com/forums/inde...tes/#creating-a-template-with-single-elements

In a link to PDF you can override the PDF defined in form or list settings by adding &pdf_template=your-PDF-template to the URL.
 
Maybe I did not understand well or I wrote myself badly ^^,
what I would like to do is this: (view the attachment)
If I click the print icon (or create PDF) I should have a template with some text and some parameters chosen by me (in the case $ name and $ subject).
How can I do?
 
The wiki page Troester pointed you at gives you the basics of how to access an individual element's data, you'd just need to wrap that in whatever text you need.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top