Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save nuriye/338c148d5aae96fb6afc7db1278daa5e to your computer and use it in GitHub Desktop.
Save nuriye/338c148d5aae96fb6afc7db1278daa5e to your computer and use it in GitHub Desktop.
/****
* Put this in the pdf template
*
***/
add_filter( 'gfpdf_field_html_value', function($html, $value, $show_label, $label, $field, $form, $entry, $class) {
/* Wenn Class "wps-notinpdf" gesetzt ist, wird das Feld vom PDF ausgeschlossen */
if (strpos ($field['cssClass'], 'notinpdf') !== false) {
$html = '';
}
return $html;
}, 10, 8 );
add_action( 'gfpdf_field_section_break_html', function( $html, $title, $description, $value, $field, $form, $entry, $class ) {
if (strpos ($field['cssClass'], 'notinpdf') !== false) {
$html = '';
}
return $html;
}, 10, 8 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment