Use this filter to dynamically attach or exclude a PDF from the notification being processed.
This filter was introduced in Gravity PDF 4.2.
$attach | boolean
trueto attach the PDF to the current notification, or
$notification | array
- The current Gravity Forms notification being processed
$settings | array
- The current PDF settings being processed
$entry | array
- The raw Gravity Form Entry array.
$form | array
- The Gravity Forms array
The following will include all generated PDFs with all Gravity Forms notifications:
The above isn't really useful though. The below sample will attach any PDF with a name containing the word 'Submission' to any Gravity Form notification on form #5:
This filter is located in the
Model_PDF::maybe_attach_to_notification() method in