1. Fabrik 3.9 has been released. If you have updated Joomla to 3.9, this is a required update.
    Dismiss Notice

Having an issue displaying images in DOMPDF

Discussion in 'Community' started by wqwi853, May 17, 2019 at 8:02 PM.

  1. wqwi853

    wqwi853 Member

    Level: Community
    In my list/form I have an image upload/photo field. Sometimes there may be one image, other times there can be multiple images.

    We're trying to create a new custom PDF template that will be able to show the photos displayed on the details page. When exporting the PDF with the code below, it won't handle multiple images. I'm assuming we need to loop these somehow but we're not sure how.

    Code (Text):
    <?php echo "<strong>Photo(s):</strong> <img src='" . $this->groups['Incident Report System']->elements['photo']->element_ro?>'/><br />
    When inspecting the element in web tools it shows something like this in the img tag...

    Code (Text):
    <img src="/&lt;div%20class=%22fabrikSubElementContainer%22&gt;%0A%09%09%09&lt;div%20class=%22fabrikGalleryImage%22%0D%0A%09%09%09style=%22width:px;height:px;%20vertical-align:%20middle;text-align:%20center;%22&gt;%0D%0A%09%09&lt;img%20class=%22fabrikLightBoxImage%22%20src=%22https://mysite.org/images/photos/HxWwk7RPfK.jpg%22%20alt=%22%22%20title=%22%22%20/&gt;%09%09%09&lt;/div&gt;%0D%0A%09%09%0A&lt;/div&gt;">
    Totally stuck. Any help would be appreciated.
  2. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    Try just ...

    Code (Text):

    <?php echo "<strong>Photo(s):</strong>" . $this->groups['Incident Report System']->elements['photo']->element_ro?>'<br />
    -- hugh

Share This Page