Get Value from another element

WordPress
27 February, 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
27 February, 2021 18:26:51
E2Pdf
Support
Topics: 7
Messages: 3330
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!
28 February, 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
28 February, 2021 10:18:05
E2Pdf
Support
Topics: 7
Messages: 3330
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!
28 February, 2021 16:17:42
Topics: 1
Messages: 3
Thank you very much! This has worked.
Great support and fantastic service!
Much appreciated!