Assistance Needed with E2Pdf Shortcode for Generating Multiple Certificates

Forminator Forms
24 August, 2024 04:40:33
alisaife
Topics: 1
Messages: 1
I am facing a challenge using the e2pdf-for shortcode to replicate data from a Forminator form in a PDF template. The goal is to create multiple certificates based on student names entered in a textarea field, with each name entered on a new line. I have used the following shortcode, but it is not working as expected:

----------------------------
[e2pdf-for data="{textarea-1}"]
[e2pdf-for-do]
Student Name: [e2pdf-content content="{.}"]
[/e2pdf-for-do]
[e2pdf-for-else]
No names available to display.
[/e2pdf-for-else]
[/e2pdf-for]
---------------------------------------

I aim to produce a set of certificates, each personalized based on each entered name. Could you clarify if there is an error in the code or the way it is applied? Is there a specific method I should follow to achieve the desired repetition for creating certificates based on each entered name? Please help me correct the issue or guide me to achieve the desired results.

Thank you for your support and cooperation.
24 August, 2024 05:35:41
E2Pdf
Support
Topics: 7
Messages: 3312
Hello,

[e2pdf-for] shortcode is available only in the "E2Pdf Template" context and can't be used outside the E2Pdf Template.

If you need data to output separated names inside a generated single PDF, there is a possibility to use [e2pdf-format-output] shortcode wrapper or iterate via [e2pdf-for] shortcode. The syntax examples can be found here: https://codefile.io/f/2pyRi0AD1M

If you need to generate a separate PDF file for each line in "textarea", unfortunately, it would require some PHP coding/custom hooks as Forminator Forms cannot output line-by-line values that could be used as separate values to generate different PDFs, for example, to be used as "arg" attributes withing E2Pdf shortcodes.
We would really appreciate your feedback at WordPress.org!