HI
I have the following code to attach documents in my functions.php file, if I wanted to add a file ID with the csv attached how would I amend the code so that it still sends these files and the csv to another form, for example form 1?
CODE in functions.php:
<?php
add_filter("gform_user_notification_attachments", "add_attachment", 10, 3);
function add_attachment($attachments, $lead, $form) {
    if ( $form[ 'id' ] == 17 )  {
        $doc = '/The-Membership-Rules.pdf';
    } elseif( $form[ 'id' ] == 22 ) {
        $doc = '/The-Membership-Rules.pdf';
    } else {
      $doc = '';
    }
    $upload = wp_upload_dir();
    $upload_path = $upload["basedir"];
    $attachments = array();
    $attachments[] = $upload_path . $doc;
    return $attachments;
}
?>Thanks
Nic

