by iDevIT

SuiteCRM Signature Field Plugin Add signature fields directly from the studio to allow your prospect to agree and sign your records. Add Signature fields on any Studio-enabled module (base and custom modules), and print it on the PDF templates !

Cancel at any time!
Free Trial

#4790 - Signatures not shown at PDF templates

Closed Bug? created by a year ago

I'm trying your module and works great creating the field in the studio and I'm able to sign on each contact, but on PDF templates, the field isn't showed even I copied the code in templateParser.php:

} elseif ($field_def['type'] == 'Signature') {
      $repl_arr[$key . "_" . $fieldName] = '<img src="src" alt="image" />$fieldName . '" width="'.$field_def['width'].'" height="'.$field_def['height'].'">';

I'm using suite CRM 7.12.9. I also would like to use it on Mail Merge Reports module. It's possible?

Can you help me to make it work?

Best regards, Carles.

  1. idevit member avatar

    iDevIT Provider Affiliate

    a year ago

    Hello Carles,

    I have updated the documentation regarding version 7.12.x and 7.13.x It is on line 118 because SuiteCRM added a new elseif statement in these versions for the "wysiwyg" field type that was not present on 7.11.x

    Can you please tell me is this fix your first question over the PDF templates please ?

    The module has never been intended to work with mail merge. TO what I understand MailMerge is a module to mass email customers with a given email template What is the functionnal scenario you want to achieve please ?

    Regards IDevIt

  2. CarlesSTIC member avatar

    a year ago

    Hi iDevIT,

    I paste between image and wysisyg field and continues the error:

    } elseif ($field_def[&#039;type&#039;] == &#039;image&#039;) {
                        $secureLink = $sugar_config[&#039;site_url&#039;] . &#039;/&#039; . "public/" . $focus->id . &#039;_&#039; . $fieldName;
                        $file_location = $sugar_config[&#039;upload_dir&#039;] . &#039;/&#039; . $focus->id . &#039;_&#039; . $fieldName;
                        // create a copy with correct extension by mime type
                        if (!file_exists(&#039;public&#039;)) {
                            sugar_mkdir(&#039;public&#039;, 0777);
                        }
                        if (!copy($file_location, "public/{$focus->id}".  &#039;_&#039; . (string)$fieldName)) {
                            $secureLink = $sugar_config[&#039;site_url&#039;] . &#039;/&#039;. $file_location;
                        }
    
                        if (empty($focus->{$fieldName})) {
                            $repl_arr[$key . "_" . $fieldName] = "";
                        } else {
                            $link = $secureLink;
                            $repl_arr[$key . "_" . $fieldName] = &#039;<img src="&#039; . $link . &#039;" width="&#039; . $field_def[&#039;width&#039;] . &#039;" height="&#039; . $field_def[&#039;height&#039;] . &#039;" alt="image" />&#039;;
                        }
                    } elseif ($field_def[&#039;type&#039;] == &#039;Signature&#039;) {
                        $repl_arr[$key . "_" . $fieldName] = &#039;<img src="src" alt="image" />$fieldName . &#039;" width="&#039;.$field_def[&#039;width&#039;].&#039;" height="&#039;.$field_def[&#039;height&#039;].&#039;">&#039;;
                    } elseif ($field_def[&#039;type&#039;] == &#039;wysiwyg&#039;) {
                        $repl_arr[$key . "_" . $field_def[&#039;name&#039;]] = html_entity_decode($focus->$field_def[&#039;name&#039;],
                            ENT_COMPAT, &#039;UTF-8&#039;);
                        $repl_arr[$key . "_" . $fieldName] = html_entity_decode($focus->{$fieldName},
                            ENT_COMPAT, &#039;UTF-8&#039;);
    

    About Mail Merge it's a module to create Word or excels templates and we use it to create certifications for example.

    Best, Carles.

  3. CarlesSTIC member avatar

    a year ago

    Hi guys, any news about this?

    Thanks a lot, Carles.

  4. CarlesSTIC member avatar

    a year ago

    Hi guys, I found a solution by myself: Change the PDF engine to "Legacy MPDF Engine" and works.

    Best, Carles.

This case is public. Please leave out any sensitive information such as URLs, passwords, etc.
Saving Comment Saving Comment...
Rating