Pdf fields

aje

Member
Hi
I have a list with
date
nama
adress
postal code
city.
In the pdf i want every field exept the date field. How can i do this ?
 
The PDF is related to the displayed list.
You can
copy your list, remove the date element from list view and use this list for PDF
or
create a custom PDF template which is explicitly skipping the date element
 
I haven't tried, but could potentially do it with some CSS as well?

I think you could add some conditional CSS in custom_css.php which did something like ...

PHP:
$format = JFactory::getApplication()->input->get('format', '');
if ($format == 'pdf') {
   echo "... css to set display for that column class to 'none' ...";
}

-- hugh
 
Nice idea but it seems you can't use Jfactory (Fatal error</b>: Class 'JFactory' not found ).

But you can create a custom PDF template (just copy bootstrap), edit custom_css.php and add the CSS there without condition

echo "
#listform_$c th.your-date-element {display:none}
#listform_$c td.your-date-element {display:none}
";
 
Oh, silly me, I forgot the CSS is called directly, not through the J! framework. So you could just grab it from the request array ...

PHP:
if ($_REQUEST['format'] == 'pdf') {

-- hugh
 
I just prefer solutions that can be done with the out-of-box templates, avoiding the overhead and potential issues with keeping entire custom templates in sync with Fabrik.

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

Thank you.

Members online

Back
Top