Filter for fields

Gravity Forms
27 May, 2020 13:42:02
israelj
Topics: 13
Messages: 17
Is there a Wordpress Filter for fields before the PDF is generated?

Example: we want to store certain fields in an encrypted format, but want the unencrypted value to be shown on the PDF.

Thanks!
27 May, 2020 18:31:39
E2Pdf
Support
Topics: 7
Messages: 3335
Hi,

There is a hook 'e2pdf_extension_render_shortcodes_value' which is used to output value before render to PDF but after processing of shortcodes which seems what you need:

$value - current value that was already replaced by Gravity Forms shortcode
$element_id - element id of E2Pdf field/object which you can get by "Right Mouse Click" -> "Properties".
$template_id - is template id where this field located
$item - Gravity Forms Form ID
$dataset - current entry

https://codeshare.io/alnzDD

Example is prepared to be added to functions.php


add_filter( 'e2pdf_extension_render_shortcodes_value', 'my_filter_function', 10, 5 );

function my_filter_function($value, $element_id, $template_id, $item, $dataset) {
return $value;
}


We remain at your service.

We would really appreciate your feedback at WordPress.org!