I have attached an example. We have a form, where some questions are answered by selecting one or more checkboxes. Those values are being stored in the database as arrays. E2PDF appears to be just printing what is in the database instead of the reader-friendly values. How can we configure it to use the reader-friendly values?
Unfortunately E2Pdf has not yet native support of Toolset, however it must be possible to solve such task of 1 by the following ways:
E2Pdf currently can navigate via arrays by using "path" attribute on shortcode. To accomplish it with this way you must create "textarea" inside PDF with shortcode that outputs serialized value, as example we will be using: [meta key="wpcf-checkbox-1"]
In our case serialized value looks like:
a:2:{s:64:"wpcf-fields-checkboxes-option-ed2aa5d6f07e8805136cc5f32f3e77ba-1";a:1:{i:0;s:1:"1";}s:64:"wpcf-fields-checkboxes-option-d41ae1e90e0cdc01acdbc9eb2eb9ab87-1";a:1:{i:0;s:1:"1";}}
So after unserialize operation we get the path to navigate, (dot (.) must be used as delimiter between array keys), it's if you need to output values separately:
However if you need to output all values in one line, you will need to use custom function filter, which must be added to functions.php to get the list of checkboxes values and "implode" them.
We use tools, such as cookies, to enable essential services and functionality on our site and to collect data on how visitors interact with our site, products and services. By accepting cookies you are agreeing to our Cookie Policy.