e2pdf-download for each row in a repeater field

Bug Released
May 01, 2024 00:22:17
Vernon
Topics: 2
Messages: 6
I have a repeater field stored in wp_usermeta. I'm able to use the following to successfully get data from the first repeater field to populate and create the populated PDF template for download/view.

[e2pdf-user key="accreditation_details" path="item-0.accreditation_date" meta="true"]

What I want to do is have a download button for each item in the repeater group. I've tried various combinations of trying to pass arg1= index to the form, but haven't been successful. Can you please help me with the correct approach to replace the "item-0" with item-X where index would be the element offset in the repeater field?
May 01, 2024 01:57:04
E2Pdf
Topics: 7
Messages: 3617
Support
Hello,

Can you try please:

1. Setup your shortcodes as follows:

[e2pdf-download id="1" arg1="item-0"]

[e2pdf-download id="1" arg1="item-1"]

etc...

2. Inside the E2Pdf Template use the construction as follows:

[e2pdf-user key="accreditation_details" path="[e2pdf-arg key=arg1].accreditation_date" meta="true"]

3. You must be able to prevent empty PDF download link generation by using "Global Conditional Logic", see please the screenshot attached.

We would really appreciate your feedback at WordPress.org!
May 01, 2024 03:41:06
Vernon
Topics: 2
Messages: 6
With the template values set as depicted in the first screenshot.
And called with the first screenshot, and called using the shortcode as depicted in the second screenshot, I get the results in the PDF as depicted in the third screenshot.

Seems like the [e2pdf-arg key=arg1] when embedded inside the [e2pdf-user ...] isn't begin resolved.

I also tried with single quotes around key='arg1' and got the same result.
May 01, 2024 04:19:21
E2Pdf
Topics: 7
Messages: 3617
Support
Thank you for the detailed screenshots. We could replicate the issue and it was marked as a bug.

A fix in the RC version 1.23.29 was already released. Please update the plugin to the latest RC version by following the steps here: https://e2pdf.com/docs/install#rc-version

P.S. The current RC version also has simplified "arguments" shortcodes support and it must be possible to use: [e2pdf-arg1] instead of [e2pdf-arg key=arg1] inside the E2Pdf Template.

Please, let us know if you still have issues after the update.

We would really appreciate your feedback at WordPress.org!
May 01, 2024 04:42:21
Vernon
Topics: 2
Messages: 6
Working great! Thanks!
May 01, 2024 09:46:00
Vernon
Topics: 2
Messages: 6
In the forum I see a couple of references to using a custom shortcode to pass dynamic variables. For example the topic “Ultimate Member profile page download pdf link”. Unfortunately it seems like the codefile.io examples are no longer available. Can you please provide a new example?

In my case I’ll want to pass the offset in a series of rows to populate the arg1=“item-{index}”.


Thanks in advance!
May 01, 2024 10:20:11
E2Pdf
Topics: 7
Messages: 3617
Support
The topic is still available:

https://e2pdf.com/support/desk/ultimate-member-profile-page-download-pdf-link.

We can access codefile without any issues: https://codefile.io/f/W1hvSclxhN

P.S. The latest RC version also has extended users support, where you can connect the E2Pdf Template to the "WordPress" -> "Users" if you need just the data from the user, which is more correct. In case of connection to "WordPress" -> "Users" the code will be as follows: https://codefile.io/f/FiuH1GEJbm.

P.P.S. The example for the Ultimate Member, and um_profile_id() returns the User ID.

We would really appreciate your feedback at WordPress.org!
May 01, 2024 23:06:40
Vernon
Topics: 2
Messages: 6
Interesting. Seems like codefile.io doesn't work on mobile devices. Accessing the same URL on my iPhone shows an empty unnamed file. (Screenshot attached if interested.)

I'm just capturing this here in case someone else experiences the same situation.

Get News and Updates
Our monthly newsletter keeps you in the loop, so you'll always be up to date with the latest news and updates about E2Pdf.
* You can update your email subscription preferences here.
All trademarks, service marks, trade names, product names, and logos appearing on this website are the property of their respective owners. The use of trademarks such as Formidable Forms®, Forminator Forms®, Gravity Forms®, JetFormBuilder®, WordPress®, WooCommerce®, WPForms® and others is solely for identification purposes (nominative use) and does not imply any affiliation, sponsorship, or endorsement by the respective trademark holders.
© 2017 - 2026, https://e2pdf.com

We use cookies to collect and analyse information on site performance and usage, to provide social media features and to enhance and customise content and advertisements. By clicking "Accept Selected", you consent to use of selected cookies according to our Cookie Policy.