Export attachments easily

Status
Not open for further replies.
Hi

I answer just now because thanks to your last post, I have greatly improved my PDF exports, but it took time to adapt my code, but with success!!! :D

So thank you! My exports are increasingly pro!

So now, I'd like to go further, and I have some more questions:

- How to hide a field without condition ?
In fact, I can already do this, but like this:
Code:
if ($element->id == 'mytable___field1_ro' && $this->elements['field1']) {continue;}
It work, but I do not know if it is really the good way. What do you think about ?


- How to view complete email address in the PDF export (no problem in my web form).
Indeed, in my PDF, I have always:
This e-mail address is protected against spambots. You need JavaScript enabled to view it


- How to "catch" a field, or a field title, or a complete group, to customize it in the custom_css.php ?
Indeed, I can customized all the "fabrikElement", but I can not customized fields separately. For example, I have tried this but without success:
Code:
#{$form} .fabrikElement div#mytable___field1{
    background-color: red !important;
}


- How to insert images in the detail template default.php ?
Indeed for example, when I use this code, image are in black and with and bad quality:
Code:
<img  style="float: right;" alt="logo DRIIHM" src="images/logo.png">


- More difficult : how to hide a group according the value of a field that is not in the group in question ?
Indeed, thanks to you, I can already hide a group according the value of a field, but only if the field is in the group, like this:
Code:
if ((int) $group->id === 111 && $this->groups['Name of the group']->elements['field1']->value === '') :continue;endif;

Aaarf, sorry for all questions, but more it work, more we want it work ! :p


Thank you !!!! :rolleyes:
 
Hey, glad to hear you are making progress :)
Code:
if ($element->id == 'mytable___field1_ro' && $this->elements['field1']) {continue;}
that looks fine to me.

This e-mail address is protected against spambots. You need JavaScript enabled to view it
That would be the Joomla email cloak plugin trying to run. It relies on javascript to run which of course isn't present in the PDF. To fix this could you try adding:

Code:
{emailcloak=off}
to the top of the PDF template. That should turn off the email cloaking features. If that works let me know and I'll add it to the PDF view code.

For styling a specific element:

CSS:
.fb_el_tablename___elementname  {
    border: 1px solid blue;
    padding: 20px;
}
Replace tablename___elementname with your elements full name.

- How to insert images in the detail template default.php ?
That mark up looks ok. Is the png transparent? If so perhaps make one that is not transparent.

- More difficult : how to hide a group according the value of a field that is not in the group in question ?
That should work. Check what the properties are for the element by doing:
PHP:
echo "<Pre>";print_r($this->groups['Name of the group']->elements['field1']);echo "</pre>";
That should show you an object containing each of the element properties, specifically check if the value is really '' and not for example an empty array.

Aaarf, sorry for all questions, but more it work, more we want it work
No problem. However, if you have further questions on these issues, could you create a new post per question? It makes it easier for us to manage the conversation

Thanks!
 
Hi thank you !

I have tested some of theses lasts proposals, with more or less success, I go to open a ticket for each, see you !

THX
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top