I'm trying to display repeater fields that I created in JetEngine plugin. I can't understand how to properly use path it returns empty array.
This is my code in template [meta key="pdf-rooms" ] and this is what I get in pdf
a:2:{s:6:"item-0";a:3:{s:7:"roomid";s:5:"B3.26";s:9:"roomname";s:6:"Toilet";s:9:"roomarea";s:2:"20";}s:6:"item-1";a:3:{s:7:"roomid";s:5:"B3.25";s:9:"roomname";s:5:"Potel";s:9:"roomarea";s:2:"12";}}
I want this to be formatted as " B3.26 Toilet 20 " and so on
Could you please help with this?
Thank you!
11 November, 2020 05:50:37
E2Pdf
Support
Topics: 7
Messages: 3573
Hi,
It must be as follows: [meta key="pdf-rooms" path="item-0.roomid"], [meta key="pdf-rooms" path="item-0.roomname"], etc. However your value has incorrect format and can't be converted to array by some reason.
If you have PDF "flattened" it could be that not all data fit in field. Can you try to map "textarea" inside PDF and export with "Flatten" "No" option (screenshot 1) via "E2Pdf" -> "Export" to see full output in created "textarea" field and try to convert it to array with https://www.unserialize.me/
For example serialized value must be possible to convert to array with follow service: https://www.unserialize.me/ as on screenshot 2 (in the example, path will look like: [meta key="key" path="0"], [meta key="key" path="1"], etc).
If it will not work, can you please attach JetEngine plugin to next message so we can review if it has correct output and no additional compatibility from our side required.
P.S. You can mark message "private" so only you and support can see the message.
We remain at your service.
11 November, 2020 16:02:03
E2Pdf
Support
Topics: 7
Messages: 3573
Hi, thank you.
We could replicate an issue on our side and currently checking if we can add compatibility fix to resolve it. We will update current thread as soon as will get any news.
We remain at your service.
11 November, 2020 19:56:50
E2Pdf
Support
Topics: 7
Messages: 3573
Hi,
After reviewing it more carefully it seems the problem not in "path" functionality, but in incorrect "copy" function as it seems that while value copied from flattened PDF in browser viewer it modifies output by some reason and room-id becomes roomid, room-name becomes roomname if PDF is flattened. So value can't be converted to array via services due incorrect structure.
If it will again not work, can you please attach generated PDF (not flattened) to next message with "textarea" and [meta key="pdf-rooms"] shortcode inside. Thank you.
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 our to our Cookie Policy.