Heads up!
This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.
This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.
Use this hook to filter the fields used for the exported PDF entry content.
Formidable Forms is the best WordPress Form Builder plugin. Get it for free!
Usage
add_filter('frm_pdfs_fields_for_export', 'remove_field_from_pdf', 10, 2);
Parameters
- $fields (object [ ]): Array of field objects.
- $args (array)
- entry (object): The entry object.
Examples
Remove a field from PDF file
add_filter( 'frm_pdfs_fields_for_export', 'remove_field_from_pdf', 10, 2);
function remove_field_from_pdf( $fields, $args ) {
if ( 10 == $args['entry']->id ) { // Replace 10 with your entry ID
foreach ( $fields as $index => $field ) {
if ( 13 == $field->id ) { // Replace 13 with the field ID to remove
unset( $fields[ $index ] );
}
}
}
return $fields;
}