1. NOTICE: If you are using Fabrik and update to Joomla 3.10, you will need to update to Fabrik 3.10. And, if you are using Fabrik, do not upgrade to Joomla 4, we do not have a supported version ready for release. More information on a release date coming soon. Also, please note that Fabrik 3.10 will not install on any Joomla sites less than 3.8.
    Dismiss Notice

Fileupload element - include files in only 1 email plugin message

Discussion in 'Community' started by boyjah, Jan 20, 2022.

  1. boyjah

    boyjah Member

    Level: Community
    We have a form that uses the Fileupload element. Under the "Options"tab there is the item "Email files" with a Yes or No option. If we choose Yes, then the uploaded files are included in all emails that we generate with the Email plugin for that form.

    Is there a way to include the uploaded files only in one of the emails but not the other? Once our form is submitted we want to send a confirmation email to the user that their data has been received and we want to send an email to the Admins that includes all data from the form, including the uploaded files. But nder the "Options"tab the item "Email files" seems to be an all or nothing choice?
     
  2. elmarra

    elmarra Member

    Level: Community
    hello, there is the "form - receipt plug-in" module which acts as an email alert to the user who fills out the form.try it
     
    boyjah and lousyfool like this.
  3. troester

    troester Well-Known Member Staff Member

    Level: Community
    See also your other thread.
    https://fabrikar.com/forums/index.p...ent-email-files-vs-show-image-in-email.53202/

    You can include whatever you want to show in the email body via element placeholder (email plugin or receipt plugin).
    I didn't test wether the receipt plugin will show filename or image (I assume filename, you can add HTML to show the image).

    If you have set up PDF in Fabrik I think the easiest way to send the form to Admins is to enable "Attach as PDF" in the email plugin [Attachments]
     
    boyjah likes this.
  4. boyjah

    boyjah Member

    Level: Community
    Thank you for this good information. I tried "Attach as PDF" but the Japanese text from the form only shows as a series of question marks.

    Screen Shot 2022-01-20 at 22.37.56.png
     
  5. troester

    troester Well-Known Member Staff Member

    Level: Community
  6. boyjah

    boyjah Member

    Level: Community
    Yes, I inserted * {font-family:'dejavu sans'!important}
    into
    /components/com_fabrik/views/form/tmpl/bootstrap/custom_css.php
    and
    /components/com_fabrik/views/details/tmpl/bootstrap/custom_css.php

    In each of the custom_css.php files I made no changes to the content other than to add the single line of css here:
    Screen Shot 2022-01-21 at 16.01.35.png

    This does change the fonts on details view and edit view, but the PDF that is sent by email still has the question marks. Is there a different place that I must put * {font-family:'dejavu sans'!important} so that the emailed PDF will display correctly?
     
  7. troester

    troester Well-Known Member Staff Member

    Level: Community
    on details and edit view? or on PDFs generated via the PDF button?

    Did you select a PDF template in form [Layout] settings?
    This one is used for PDFs via PDF button and for the email PDF attachment. The utf8 CSS must be included there.

    The PDF template is a details template and if you want to have a 'nice' PDF you should create a custom template because the PDF libs need some additional CSS.
     
  8. boyjah

    boyjah Member

    Level: Community
    PDF template selected in Form->Layout is bootstrap (but we also tried all other options)
    PDF template selected in List->Layout is bootstrap (but we also tried the other option: div)

    We do not use the PDF button. We only send PDF files as email PDF attachment

    We inserted * {font-family:'dejavu sans'!important}
    into
    /components/com_fabrik/views/form/tmpl/bootstrap/custom_css.php
    and
    /components/com_fabrik/views/details/tmpl/bootstrap/custom_css.php

    After inserting this CSS, the font does change on details and edit view, but emailed PDF contains question marks.

    We don't care about a "nice" PDF, we just want Japanese characters instead of question marks.
     
    Last edited: Jan 25, 2022
  9. troester

    troester Well-Known Member Staff Member

    Level: Community
    It seems dejavu doesn't support Japanese characters.
    I got it working with some free Japanese ttf font I found and copied to a local folder.
    In the details custom_css.php
    Code (Text):
     @font-face {
      font-family: 'jap';
      font-style: normal;
      font-weight: normal;
      src: url('/Oshidashi-M-Gothic-TT.ttf') format('truetype');
    }
    * {font-family:'jap'!important}
    So load a Japanese ttf font via @font-face from a local folder or from the web (it's also possible to add it to the domPDF lib but I don't know extactly how to).
     
    Last edited: Jan 25, 2022

Share This Page