Get Value from another element

WordPress
February 27, 2021 17:05:37
Topics: 1
Messages: 3
Great product, many thanks!

Using [e2pdf-user id="1"]; Would it be possible to use the value from another element? like this, and how?:-

[e2pdf-user id={value from another element}]

Many thanks,
Stu
February 27, 2021 18:26:51
E2Pdf
Topics: 7
Messages: 3617
Support
Hi, thank you.

Unfortunately it's not yet possible to do by default, however:

Do you need to output some user details which ID is stored under some meta key under wordpress post? If so, it's possible to do via custom PHP filter. Can you let us know which shortcode do you use which must be set as "id" of user so we can prepare example for you?

We remain at your service.

We would really appreciate your feedback at WordPress.org!
February 28, 2021 07:42:59
Topics: 1
Messages: 3
Hi, thank you for swift response!

The field created using ACF is ‘broker’. This field is set to select user, using dropdown on a form. I want to be able to then pull their nickname and email address, to place on PDF.

Many thanks,
Stu
February 28, 2021 10:18:05
E2Pdf
Topics: 7
Messages: 3617
Support
Hi,

So if you are using shortcode [e2pdf-wp key="broker" meta="true"] and it's output User ID, you will need:

1. Add filter to your functions.php or create PHP Snippet: https://codeshare.io/5Zg31n

2. Use below shortcodes inside E2Pdf Template to output needed data:

[e2pdf-wp key="broker" meta="true" subkey="nickname"] - to output nickname

[e2pdf-wp key="broker" meta="true" subkey="user_email"] - to output User email

Let us know please if you will face any issues.

We remain at your service.

We would really appreciate your feedback at WordPress.org!
February 28, 2021 16:17:42
Topics: 1
Messages: 3
Thank you very much! This has worked.
Great support and fantastic service!
Much appreciated!
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.