Additional image in email attachment

Forminator Forms
15 November, 2023 03:33:11
Bisdanner
Topics: 1
Messages: 3
Hi,

I'm using e2pdf with forminator forms to create a personal pdf with metadata and form inputs. The form is embedded in a post where I use hooks to fill some pdf values (like featured_image and publishing date...this works pretty fine.

The created pdf is sent by email [e2pdf-attachment id="1" name="my_certificate"].

Now I want to attach the featured_image (used in template as e2pdf-image and the value will be set by a hook with the featured_image of the post).

I used [e2pdf-user key="metakey" meta="true" attachment_image_url="true" size="full"] but i doesn't work.

Have you guys and idea?

Best, Thomas
15 November, 2023 05:34:57
E2Pdf
Support
Topics: 7
Messages: 3335
Hello,

Sorry, can you please clarify:

In the 1st part of the message you mentioned that you can output featured_image inside PDF, but in 2nd part of the post it looks like the same request or we are misunderstanding which featured_image you are trying to output inside PDF in the 2nd case.

Do you need to output the user image? avatar? some 3rd party image that is saved in user meta value? If so, do you get any output by using the shortcode below?

[e2pdf-user key="metakey" meta="true"]


We would really appreciate your feedback at WordPress.org!
15 November, 2023 06:30:57
Bisdanner
Topics: 1
Messages: 3
Hi,

sorry for this unclarified message.

I created a forminator form with additional hidden values (embedded post id). With this IDs and some hooks (provided from your team ;) ), I can generate the pdf with e.g. date and featured image of the post where the forminator form is embedded. This works very well. The finished pdf should be sent by email.

Additionally I want to send the same featured image of the post as a second attachment in the email.

The shortcode [e2pdf-user key="metakey" meta="true"] is transfered as plain string in the email.
15 November, 2023 06:50:21
E2Pdf
Support
Topics: 7
Messages: 3335
[e2pdf-user] shortcode is the internal shortcode that outputs the data from the user but can't add an attachment to the email.

We are pretty sure that it must be possible to accomplish the task with some additional PHP code and hooks, but, unfortunately, you need to contact the Forminator Team directly as the functionality is directly related to the Forminator Form and not to E2Pdf.
We would really appreciate your feedback at WordPress.org!
15 November, 2023 07:14:45
Bisdanner
Topics: 1
Messages: 3
Thanks for the help, I will contact the Forminator Team.

Best, Thomas