Shortcode to Display Advanced Custom Fields (ACF) Select Field Value in HTML Object

August 20, 2024 04:52:37
kaya.murer
Topics: 7
Messages: 20
I want do display the value from the acf custom select field "my-field" in an html object.

I am using the following markup but on the generated pdf i get the word "Array" instead of the selected values from the acf select field.
[acf field="my-field" post_id="[id]"]

I don’t know if this matters but i am using an empty html object where i add content pieces with if conditions via actions.
Is there any documentation on how to include the different acf field types in e2pdf?

Thanks a lot!
August 20, 2024 04:54:21
E2Pdf
Topics: 7
Messages: 3614
Support
Hello,

Can you please let us know:

1. What is the field type of the "my-field"?
2. Which ACF version do you use?

We would really appreciate your feedback at WordPress.org!
August 20, 2024 04:57:04
kaya.murer
Topics: 7
Messages: 20
Hello,

Thank you for your really fast reply.

1. "my-field" is a select type
2. Currently installed is ACF Pro 6.3.4
August 20, 2024 04:59:06
E2Pdf
Topics: 7
Messages: 3614
Support
Can you please update the ACF to 6.3.5, due 6.3.4 has issues with outputting some values correctly via shortcodes and the issue seems connected with it.

https://www.advancedcustomfields.com/blog/acf-6-3-5/

* Fix – The ACF Shortcode now correctly outputs a comma separated list of values for arrays

We would really appreciate your feedback at WordPress.org!
August 20, 2024 05:04:22
kaya.murer
Topics: 7
Messages: 20
Oh wow great!
Did the update and everything is working like a charm now.

Thank you a lot for this outstanding fast support.

Wish you a nice day.
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.