frm_notification_attachment

Contents

Attach files to email notifications. The file must be uploaded to your site before it can be included in the email.
Parameters: $attachments (array), $form (object)

This requires the absolute path to the file in order for the email to find it. You can find the absolute path to your WordPress installation on the Formidable -> Settings page, right beneath the “Path to Extra Templates” option.

Examples

add_filter('frm_notification_attachment', 'add_my_attachment', 10, 3);
function add_my_attachment($attachments, $form, $args){
//$args['entry'] includes the entry object
if($form->id == 5){ //change 5 to the ID of your form
  $attachments[] = '/path/to/the/file/file.pdf'; //set the ABSOLUTE path to the image here
}
return $attachments;
}