Displaying signature in template for PDF generation

Hi,
I assume there is a trick to display the signature through a template to be printed.
I can get any fields with the follwing code :

<?php
$MyInscriptions = $this->groups['Inscriptions'];
$data_inscriptions = $MyInscriptions->elements;
echo $data_inscriptions['nom']->element; ?>


To display the name for exemple.
knowing that my signature is in group "sign" and element is named "signature", I'm using that code
<?php
$MyInscriptions = $this->groups['sign'];
$data_inscriptions = $MyInscriptions->elements;
echo $data_inscriptions['signature']->element; ?>


but it doesn't display anything
Searched on forum and found only posts related to direct access to signature ( as http://fabrikar.com/forums/index.ph...ature-on-email-body-on-pdf.46084/#post-241180 )
Any insight or article which could help me ?
thx !
 
here is the default.php attached. I replaced it at first from the default.php from bootstrap
 

Attachments

  • default - Copy.txt
    8.7 KB · Views: 6
so, if I just need the signature field, I should use :

<?php
$element = $this->groups['sign']->elements['signature'];
echo '***<br>';
echo $element->element;
echo '***<br>';
?>

still nothing ... is the css so important ?
Because when I try to use it, it generates me an error...
 
No, the HTML and CSS are not important as long as you only want to display something (without any (form) functions, tooltips etc).
Your code seems to be ok.
Check again with var_dump (or the jdump extension).

...->element contains the formatted element, something like
<div class="fabrikElementReadOnly" id="zita1_fb_contact_sample___message_ro"> xyz </div>

You may use ...->element_raw
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top